diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2013-02-13 12:00:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-13 19:42:16 -0500 |
commit | bc9a25d21ef8bad30e259af5114ccfb845c066db (patch) | |
tree | 70b44a0a84ecf60c227af9bb35c43c2f7c718d5e /net/bridge/br_private.h | |
parent | 1690be63a27b20ae65c792729a44f5970561ffa4 (diff) | |
download | linux-bc9a25d21ef8bad30e259af5114ccfb845c066db.tar.gz linux-bc9a25d21ef8bad30e259af5114ccfb845c066db.tar.bz2 linux-bc9a25d21ef8bad30e259af5114ccfb845c066db.zip |
bridge: Add vlan support for local fdb entries
When VLAN is added to the port, a local fdb entry for that port
(the entry with the mac address of the port) is added for that
VLAN. This way we can correctly determine if the traffic
is for the bridge itself. If the address of the port changes,
we try to change all the local fdb entries we have for that port.
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.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 799dbb37e5a2..32ecfa4ef47f 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -382,11 +382,13 @@ extern int br_fdb_fillbuf(struct net_bridge *br, void *buf, unsigned long count, unsigned long off); extern int br_fdb_insert(struct net_bridge *br, struct net_bridge_port *source, - const unsigned char *addr); + const unsigned char *addr, + u16 vid); extern void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, const unsigned char *addr, u16 vid); +extern int fdb_delete_by_addr(struct net_bridge *br, const u8 *addr, u16 vid); extern int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[], struct net_device *dev, @@ -573,6 +575,7 @@ extern int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val); extern int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags); extern int nbp_vlan_delete(struct net_bridge_port *port, u16 vid); extern void nbp_vlan_flush(struct net_bridge_port *port); +extern bool nbp_vlan_find(struct net_bridge_port *port, u16 vid); static inline struct net_port_vlans *br_get_vlan_info( const struct net_bridge *br) @@ -676,6 +679,11 @@ static inline struct net_port_vlans *nbp_get_vlan_info( return NULL; } +static inline bool nbp_vlan_find(struct net_bridge_port *port, u16 vid) +{ + return false; +} + static inline u16 br_vlan_get_tag(const struct sk_buff *skb, u16 *tag) { return 0; |