> > > when a network interface is put into promiscuous mode, a kernel
> > > message is logged ie. "ep0: promiscuous mode enabled" are there plans
> > > to log the reverse of this message ie. "ep0: promiscuous mode
> > > disabled"..I think this was suggested before in the mailing-lists but
> > > did anything come of it ?
> >
> > Not that I saw. Patches would accelerate the process, probably :-)
> Patches certainly would.. :)
here's a patch for /sys/net/if.c that works on 3.2-STABLE for the
ep0 and lo0 interfaces (only ones I tested) all I did was add in
2 lines of code (whoopee doo..)
my inserted lines start with "--->"
However will this work with all interfaces ??
this was the only code I could find that calls
log() to record a "promiscuous mode enabled" message
so I guess in theory the following should work
for all interfaces ? (correct me if I'm wrong..)
-- 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);
}
-- snip --
- Cillian
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message