Page MenuHomeFreeBSD

netgraph/ng_bridge: Derive forwarding mode from first attached hook

Authored by donner on Fri, Feb 5, 8:07 AM.



Handling of unknown MACs on an bridge with incomplete learning
capabilites (aka uplink ports) can be defined in different ways.

The classical approach is to broadcast unicast frames send to an
unknown MAC, because the unknown devices can be everywhere. This mode
is default for ng_bridge(4).

In the case of dedicated uplink ports, which prohibit learning of MAC
addresses in order to save memory and CPU cycles, the broadcast
approach is dangerous. All traffic to the uplink port is broadcasted
to every downlink port, too. In this case, it's better to restrict the
distribution of frames to unknown MAC to the uplink ports only.

In order to keep the chance small and the handling as natural as
possible, the first attached link is used to determine the behaviour
of the bridge: If it is an "uplink" port, then the bridge switch from
classical mode to restricted mode.

Depends On: D23963

Test Plan

Diff Detail

R10 FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

donner requested review of this revision.Fri, Feb 5, 8:07 AM
  • rebased after landing parent
  • Switch to the new man page macros
  • rebased after landing man page modifications

Approved by: kp (mentor)

This revision is now accepted and ready to land.Sat, Feb 6, 12:52 PM