summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-08-17 17:18:56 +0100
committerRoy Marples <roy@marples.name>2018-08-17 17:18:56 +0100
commit9b99155437a9b883132648beb3b5f856139c7baa (patch)
tree8b01ec4140d5819d5b71785d15469bfab6e66a54
parent23d0716efc7ef95d255490736d01bba0321f754e (diff)
downloaddhcpcd-9b99155437a9b883132648beb3b5f856139c7baa.tar.xz
ipv4: add broadcast address to RTM_NEWADDR debug
-rw-r--r--src/ipv4.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ipv4.c b/src/ipv4.c
index 0a2594b8..8008f9e6 100644
--- a/src/ipv4.c
+++ b/src/ipv4.c
@@ -816,9 +816,17 @@ ipv4_handleifa(struct dhcpcd_ctx *ctx,
bool ia_is_new;
#if 0
- logdebugx("%s: %s %s/%d %d", ifname,
- cmd == RTM_NEWADDR ? "RTM_NEWADDR" : cmd == RTM_DELADDR ? "RTM_DELADDR" : "???",
- inet_ntoa(*addr), inet_ntocidr(*mask), addrflags);
+ char sbrdbuf[INET_ADDRSTRLEN];
+ const char *sbrd;
+
+ if (brd)
+ sbrd = inet_ntop(AF_INET, brd, sbrdbuf, sizeof(sbrdbuf));
+ else
+ sbrd = NULL;
+ logdebugx("%s: %s %s/%d %s %d", ifname,
+ cmd == RTM_NEWADDR ? "RTM_NEWADDR" :
+ cmd == RTM_DELADDR ? "RTM_DELADDR" : "???",
+ inet_ntoa(*addr), inet_ntocidr(*mask), sbrd, addrflags);
#endif
if (ifs == NULL)