> >                 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.

yes that I think that would be a better idea to check to see if it is
actually in promiscuous mode first before printing out our disabled
message so all pairs match..however doesn't the following code
from above seem to gaurd against this situation : ?

if (--ifp->if_pcount > 0)
        return (0);

from what I can see, it only turns off promiscuous mode if
if_pcount reaches zero, ie. all requests for promiscuous mode
to be off account for all the previous requests for promiscuous
mode to be on..?

..then again I'm no expert kernel hacker (yet!) and I certainly
don't pretend to be one either, so I'll leave this to the
experts :-D

- Cillian


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to