mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Add some DEBUG logging to tell us when interface addresses are being
added and removed
This commit is contained in:
parent
0f02fdac67
commit
2ea80d6d37
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87125
@ -231,6 +231,13 @@ iface_addr_Zap(const char *name, struct iface_addr *addr, int s)
|
||||
memcpy(peer4, &sspeer, sizeof *peer4);
|
||||
|
||||
res = ID0ioctl(s, SIOCDIFADDR, &ifra);
|
||||
if (log_IsKept(LogDEBUG)) {
|
||||
char buf[100];
|
||||
|
||||
snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa));
|
||||
log_Printf(LogWARN, "%s: DIFADDR %s -> %s returns %d\n",
|
||||
ifra.ifra_name, buf, ncpaddr_ntoa(&addr->peer), res);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef NOINET6
|
||||
@ -309,6 +316,13 @@ iface_addr_Add(const char *name, struct iface_addr *addr, int s)
|
||||
memcpy(peer4, &sspeer, sizeof *peer4);
|
||||
|
||||
res = ID0ioctl(s, SIOCAIFADDR, &ifra);
|
||||
if (log_IsKept(LogDEBUG)) {
|
||||
char buf[100];
|
||||
|
||||
snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa));
|
||||
log_Printf(LogWARN, "%s: AIFADDR %s -> %s returns %d\n",
|
||||
ifra.ifra_name, buf, ncpaddr_ntoa(&addr->peer), res);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef NOINET6
|
||||
|
Loading…
Reference in New Issue
Block a user