Skip to content

Commit 22fc538

Browse files
Uwe Kleine-Königdavem330
authored andcommitted
net: ipconfig: Add device name to debug messages
This simplifies understanding what happens when there is more than one device. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 874e1b7 commit 22fc538

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

net/ipv4/ipconfig.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,14 @@ static const u8 ic_bootp_cookie[4] = { 99, 130, 83, 99 };
666666
#ifdef IPCONFIG_DHCP
667667

668668
static void __init
669-
ic_dhcp_init_options(u8 *options)
669+
ic_dhcp_init_options(u8 *options, struct ic_device *d)
670670
{
671671
u8 mt = ((ic_servaddr == NONE)
672672
? DHCPDISCOVER : DHCPREQUEST);
673673
u8 *e = options;
674674
int len;
675675

676-
pr_debug("DHCP: Sending message type %d\n", mt);
676+
pr_debug("DHCP: Sending message type %d (%s)\n", mt, d->dev->name);
677677

678678
memcpy(e, ic_bootp_cookie, 4); /* RFC1048 Magic Cookie */
679679
e += 4;
@@ -857,7 +857,7 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
857857
/* add DHCP options or BOOTP extensions */
858858
#ifdef IPCONFIG_DHCP
859859
if (ic_proto_enabled & IC_USE_DHCP)
860-
ic_dhcp_init_options(b->exten);
860+
ic_dhcp_init_options(b->exten, d);
861861
else
862862
#endif
863863
ic_bootp_init_ext(b->exten);
@@ -1033,8 +1033,8 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
10331033
/* Is it a reply to our BOOTP request? */
10341034
if (b->op != BOOTP_REPLY ||
10351035
b->xid != d->xid) {
1036-
net_err_ratelimited("DHCP/BOOTP: Reply not for us, op[%x] xid[%x]\n",
1037-
b->op, b->xid);
1036+
net_err_ratelimited("DHCP/BOOTP: Reply not for us on %s, op[%x] xid[%x]\n",
1037+
d->dev->name, b->op, b->xid);
10381038
goto drop_unlock;
10391039
}
10401040

@@ -1075,7 +1075,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
10751075
}
10761076
}
10771077

1078-
pr_debug("DHCP: Got message type %d\n", mt);
1078+
pr_debug("DHCP: Got message type %d (%s)\n", mt, d->dev->name);
10791079

10801080
switch (mt) {
10811081
case DHCPOFFER:

0 commit comments

Comments
 (0)