diff options
author | brian <brian@FreeBSD.org> | 2001-11-30 14:01:18 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-11-30 14:01:18 +0000 |
commit | 496e7d9901ec551004cccad170034da79461ec12 (patch) | |
tree | a0c9ab76f76a16660c4d0c5a7a9d02d33f87f31c /usr.sbin/ppp | |
parent | 0c6aed3bcb2a0f9dce768a346cfbaa6cf749d807 (diff) | |
download | FreeBSD-src-496e7d9901ec551004cccad170034da79461ec12.zip FreeBSD-src-496e7d9901ec551004cccad170034da79461ec12.tar.gz |
Add some DEBUG logging to tell us when interface addresses are being
added and removed
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/iface.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index ea4105b..c66cb38 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -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 |