Re: IFF_PROMISC bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andi Kleen wrote:
> 
> On Tue, Feb 12, 2002 at 08:58:09PM -0800, David S. Miller wrote:
> >    From: Jeff Garzik <jgarzik@mandrakesoft.com>
> >    Date: Tue, 12 Feb 2002 23:54:54 -0500
> >
> >    Since netlink flags and dmesg show promisc mode, and promisc mode works,
> >    and SIOCGIFLAGS used to return IFF_PROMISC, I made the assumption that
> >    the problem was elsewhere :)
> >
> > Can you trace the value of dev->gflags for me through all of these
> > actions?  It should contain IFF_PROMISC when set by this bit of code:
> 
> David, it is not a bug, but more a FAQ.
> 
> Newer libpcap uses the PACKET_ADD_MEMBERSHIP to PACKET_MR_PROMISC socket
> options. They have an reference count instead of
> the old broken non ref counted bit.  packet calls dev_set_promiscuity directly.
> 
> Turning on/off the flag virtually when the reference count is >0 would
> break compatibility so it is not done.

Net stack should not call net driver to enable promisc when it is
already enabled, or disable promisc when it is already disabled, agreed?
Further, we have a lock guaranteeing that dev->set_multicast_list call
atomicity.

Given that there is a clear point when promisc is enabled or disabled, I
do not see why IFF_PROMISC cannot be managed properly.

Please help me understand the compatibility issues that prevent this,
given what I've just described...

	Jeff



-- 
Jeff Garzik      | "I went through my candy like hot oatmeal
Building 1024    |  through an internally-buttered weasel."
MandrakeSoft     |             - goats.com
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux