aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_private.h
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2014-05-16 09:59:16 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-16 17:06:33 -0400
commite028e4b8dc93be7bc3ff9e0b94cb68d7f104883b (patch)
tree039b194353e0a758a643d3b8e75b797eb3a166fe /net/bridge/br_private.h
parent63c3a622dd020dd16959fdb1bfa79710dd702420 (diff)
bridge: Keep track of ports capable of automatic discovery.
By default, ports on the bridge are capable of automatic discovery of nodes located behind the port. This is accomplished via flooding of unknown traffic (BR_FLOOD) and learning the mac addresses from these packets (BR_LEARNING). If the above functionality is disabled by turning off these flags, the port requires static configuration in the form of static FDB entries to function properly. This patch adds functionality to keep track of all ports capable of automatic discovery. This will later be used to control promiscuity settings. Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r--net/bridge/br_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 06811d79f89f..5ce3191438d8 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -174,6 +174,7 @@ struct net_bridge_port
174#define BR_ADMIN_COST 0x00000010 174#define BR_ADMIN_COST 0x00000010
175#define BR_LEARNING 0x00000020 175#define BR_LEARNING 0x00000020
176#define BR_FLOOD 0x00000040 176#define BR_FLOOD 0x00000040
177#define BR_AUTO_MASK (BR_FLOOD | BR_LEARNING)
177 178
178#ifdef CONFIG_BRIDGE_IGMP_SNOOPING 179#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
179 struct bridge_mcast_query ip4_query; 180 struct bridge_mcast_query ip4_query;
@@ -198,6 +199,8 @@ struct net_bridge_port
198#endif 199#endif
199}; 200};
200 201
202#define br_auto_port(p) ((p)->flags & BR_AUTO_MASK)
203
201#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT) 204#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)
202 205
203static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *dev) 206static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *dev)
@@ -290,6 +293,7 @@ struct net_bridge
290 struct timer_list topology_change_timer; 293 struct timer_list topology_change_timer;
291 struct timer_list gc_timer; 294 struct timer_list gc_timer;
292 struct kobject *ifobj; 295 struct kobject *ifobj;
296 u32 auto_cnt;
293#ifdef CONFIG_BRIDGE_VLAN_FILTERING 297#ifdef CONFIG_BRIDGE_VLAN_FILTERING
294 u8 vlan_enabled; 298 u8 vlan_enabled;
295 struct net_port_vlans __rcu *vlan_info; 299 struct net_port_vlans __rcu *vlan_info;
@@ -415,6 +419,7 @@ int br_del_if(struct net_bridge *br, struct net_device *dev);
415int br_min_mtu(const struct net_bridge *br); 419int br_min_mtu(const struct net_bridge *br);
416netdev_features_t br_features_recompute(struct net_bridge *br, 420netdev_features_t br_features_recompute(struct net_bridge *br,
417 netdev_features_t features); 421 netdev_features_t features);
422void br_port_flags_change(struct net_bridge_port *port, unsigned long mask);
418 423
419/* br_input.c */ 424/* br_input.c */
420int br_handle_frame_finish(struct sk_buff *skb); 425int br_handle_frame_finish(struct sk_buff *skb);