For every "promiscuous mode enabled" message printed for an interface,

print a matching "disabled" message when we drop out of promiscuous
mode for that interface.

Discussed on the freebsd-hackers mailing list.
This commit is contained in:
Sheldon Hearn 1999-08-30 11:55:30 +00:00
parent 6641a1b79d
commit cd9e4cab46

View file

@ -832,6 +832,8 @@ ifpromisc(ifp, pswitch)
if (--ifp->if_pcount > 0)
return (0);
ifp->if_flags &= ~IFF_PROMISC;
log(LOG_INFO, "%s%d: promiscuous mode disabled\n",
ifp->if_name, ifp->if_unit);
}
ifr.ifr_flags = ifp->if_flags;
error = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);