Is a driver allowed to modify dev->flags?
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 3e89c32348ce76.94538914@not right
Quoted 4 lines · Rask Ingemann Lambertsen
Hi.
Is a network device driver allowed to modify
dev->flags? For example:
Quoted 9 lines
if (
dev->flags&IFF_ALLMULTI)dev->flags |= IFF_PROMISC;I've found it to cause the
IFF_PROMISCflag to stick when using "tcpdump -p", which to my surprice sets theIFF_ALLMULTIflag.Regards,
Rask Ingemann Lambertsen
You are supposed to increment the promisc requestors. I think something like this:
dev_set_promiscuity(dev, 1);
Signature · 3 lines
Ben Greear <[email protected]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
Quoted 4 lines · Rask Ingemann Lambertsen
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.
Quoted 2 lines
I've found it to cause the
IFF_PROMISCflag to stick when using "tcpdump -p", which to my surprice sets theIFF_ALLMULTIflag.
Which driver are you using?
Signature · 4 lines
Donald Becker [email protected] Scyld Computing Corporation http://www.scyld.com 410 Severn Ave. Suite 210 Scyld Beowulf cluster system Annapolis MD 21403 410-990-9993
Quoted 9 lines · Donald Becker
Quoted 4 lines · Rask Ingemann Lambertsen
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.cdriver, or a driver that cribbed from it. (Is anyone still running a parallel port Ethernet device?!)
No, but I've seen such code in other Ethernet drivers and adopted it for my NE3200 driver.
Quoted 4 lines
Quoted 2 lines
I've found it to cause the
IFF_PROMISCflag to stick when using "tcpdump -p", which to my surprice sets theIFF_ALLMULTIflag.Which driver are you using?
My experimental NE3200 driver, linux 2.4.20 and tcpdump from Redhat 7.3.
Regards,
Rask Ingemann Lambertsen
Quoted 4 lines · I wrote:
Is a network device driver allowed to modify
dev->flags? For example:if (
dev->flags&IFF_ALLMULTI)dev->flags |= IFF_PROMISC;
Maybe the right question is: Is it necessary for the driver to set the IFF_PROMISC flag if the device enters promiscuous mode because it doesn't support all-multicast mode?
Regards,
Rask Ingemann Lambertsen