[Top] [All Lists]

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

To: Rask Ingemann Lambertsen <rask@xxxxxxxxxx>
Subject: Re: Is a driver allowed to modify dev->flags?
From: Donald Becker <becker@xxxxxxxxx>
Date: Tue, 1 Apr 2003 12:26:53 -0500 (EST)
Cc: linux-net@xxxxxxxxxxxxxxx, <netdev@xxxxxxxxxxx>
In-reply-to: <3e89c32348ce76.94538914@not right>
Sender: netdev-bounce@xxxxxxxxxxx
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@xxxxxxxxx
Scyld Computing Corporation   
410 Severn Ave. Suite 210               Scyld Beowulf cluster system
Annapolis MD 21403                      410-990-9993

<Prev in Thread] Current Thread [Next in Thread>