Re: Is a driver allowed to modify dev->flags?

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

 



On Tue, 1 Apr 2003, Rask Ingemann Lambertsen wrote:

> Is a network device driver allowed to modify dev->flags? For example:
> 
> if (dev->flags & IFF_ALLMULTI)
>         dev->flags |= IFF_PROMISC;

You must be looking at the atp.c driver, or a driver that cribbed from
it.  (Is anyone still running a parallel port Ethernet device?!)

Alan Cox added this code to atp.c because the chip doesn't have a
reasonable multicast filter.  The only way to receive all multicast
traffic was to turn on promiscuous mode.  But that caused a problem
with some parts of the protocol stack were passed traffic not intended
for the local host.

A better solution (which is usually easier to see later) is to have
the driver do the trivial final packet filtering itself.

> I've found it to cause the IFF_PROMISC flag to stick when using
> "tcpdump -p", which to my surprice sets the IFF_ALLMULTI flag. 

Which driver are you using?

-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Scyld Beowulf cluster system
Annapolis MD 21403			410-990-9993

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