diff options
author | Linus Lüssing <linus.luessing@c0d3.blue> | 2016-05-22 22:33:48 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-05-22 22:39:08 +0200 |
commit | a0e96d0bdad7e39590ffc8dcb46935f35ee55284 (patch) | |
tree | d0beb14de0ab781f5146076577308f7a00fed3d2 /device.h | |
parent | 6fd6be6b7f3fc4883fdc464fcbcb2b5e8d8e8174 (diff) |
bridge: make learning and unicast-flood configurable per bridge port
Tuning these two options allows a more fine grained configuration of the
forwarding database (fdb) of a bridge.
The former allows to enable or disable the learning of the presence of
MAC addresses behind a bridge port. (default: enabled on all ports)
The latter allows to tune the behaviour in case a destination MAC address
of a frame is unknown to the fdb, like only flooding on specific ports or
not flooding on any port. (default: flood on all ports, except incoming)
This can be useful to create a dumb hub, for instance for monitoring
purposes. Or in larger layer 2 mesh networks to avoid keeping redundant
databases (e.g. with the batman-adv translation table).
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -45,6 +45,8 @@ enum { DEV_ATTR_MULTICAST_TO_UNICAST, DEV_ATTR_MULTICAST_ROUTER, DEV_ATTR_MULTICAST, + DEV_ATTR_LEARNING, + DEV_ATTR_UNICAST_FLOOD, __DEV_ATTR_MAX, }; @@ -88,6 +90,8 @@ enum { DEV_OPT_MULTICAST_TO_UNICAST = (1 << 14), DEV_OPT_MULTICAST_ROUTER = (1 << 15), DEV_OPT_MULTICAST = (1 << 16), + DEV_OPT_LEARNING = (1 << 17), + DEV_OPT_UNICAST_FLOOD = (1 << 18), }; /* events broadcasted to all users of a device */ @@ -149,6 +153,8 @@ struct device_settings { bool multicast_to_unicast; unsigned int multicast_router; bool multicast; + bool learning; + bool unicast_flood; }; /* |