diff options
| author | Roy Marples <roy@marples.name> | 2018-08-17 17:18:56 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2018-08-17 17:18:56 +0100 |
| commit | 9b99155437a9b883132648beb3b5f856139c7baa (patch) | |
| tree | 8b01ec4140d5819d5b71785d15469bfab6e66a54 | |
| parent | 23d0716efc7ef95d255490736d01bba0321f754e (diff) | |
| download | dhcpcd-9b99155437a9b883132648beb3b5f856139c7baa.tar.xz | |
ipv4: add broadcast address to RTM_NEWADDR debug
| -rw-r--r-- | src/ipv4.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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) |
