> -- snip --
> if (pswitch) {
> /*
> * If the device is not configured up, we cannot put it
> in
> * promiscuous mode.
> */
> if ((ifp->if_flags & IFF_UP) == 0)
> return (ENETDOWN);
> if (ifp->if_pcount++ != 0)
> return (0);
> ifp->if_flags |= IFF_PROMISC;
> log(LOG_INFO, "%s%d: promiscuous mode enabled\n",
> ifp->if_name, ifp->if_unit);
> } else {
> 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);
Shouldn't this be:
if (ipf->if_flags & IFF_PROMISC) {
ipf->if_flags &= ~IFF_PROMISC;
log(LOG_INFO, "%s%d: promiscuous mode disabled\n", ifp->if_name,
ifp->if_unit);
}
Or is the test for IFF_PROMISC made earlier in the code? You
should only print a disabled message when it has previously
been enabled so that log file watchers can always match up
the up/down pairs.
Regards,
Niall
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message