Page MenuHomeFreeBSD

axgbe: Fix setting promisc mode
AcceptedPublic

Authored by zlei on Thu, Sep 26, 8:40 AM.

Details

Reviewers
andrew
rajesh1.kumar_amd.com
markj
Group Reviewers
network
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 Skipped
Unit
Tests Skipped

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