Page MenuHomeFreeBSD

axgbe: Fix setting promisc mode
ClosedPublic

Authored by zlei on Thu, Sep 26, 8:40 AM.
Tags
None
Referenced Files
F99695879: D46794.diff
Sat, Oct 12, 5:41 AM
Unknown Object (File)
Mon, Oct 7, 10:20 PM
Unknown Object (File)
Tue, Oct 1, 5:32 AM
Unknown Object (File)
Tue, Oct 1, 2:21 AM
Unknown Object (File)
Tue, Oct 1, 12:48 AM
Unknown Object (File)
Sat, Sep 28, 7:17 AM
Unknown Object (File)
Sat, Sep 28, 7:17 AM
Unknown Object (File)
Sat, Sep 28, 6:05 AM

Details

Summary

Ethernet drivers should respect IFF_PROMISC rather than IFF_PPROMISC.
The latter is for user-requested promisc mode, it implies the former
but not vice versa. Some in-kernel components such as if_bridge(4) and
bpf(4) will set promisc mode for interfaces on-demand.

While here, update the debugging message to be not confusing.

This was spotted while reviewing markj@ 's work D46524.

Tested by: ???
MFC after: 1 week

Test Plan

Either of the following should suffice.

  1. Do traffic sniffing on axgbe interface. The interface will enter promisc mode and should see packets not for us.
  2. Create if_bridge(4) and bring axgbe interface a member. Make traffic over if_bridge.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Thu, Sep 26, 8:40 AM
zlei added a subscriber: markj.

I do not have axgbe hardware so can not test it by myself. I'd appreciate if someone could test this fix !

sys/dev/axgbe/if_axgbe_pci.c
2358

Well, the allmulti mode (IFF_ALLMULTI) should also be handled correctly, but that is out of scope of this change.

This looks ok, but yes it needs to be tested. I don't have this hardware.

This revision is now accepted and ready to land.Thu, Sep 26, 1:29 PM

Let's get this in for the sake of correctness although my testing was inconclusive and will circle back eventually.

This revision was automatically updated to reflect the committed changes.