bridge: vlan dst_metadata hooks in ingress and egress paths
- ingress hook:
- if port is a tunnel port, use tunnel info in
attached dst_metadata to map it to a local vlan
- egress hook:
- if port is a tunnel port, use tunnel info attached to
vlan to set dst_metadata on the skb
CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
efa5356b0d
commit
11538d039a
@@ -21,6 +21,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/rculist.h>
|
||||
#include "br_private.h"
|
||||
#include "br_private_tunnel.h"
|
||||
|
||||
/* Hook for brouter */
|
||||
br_should_route_hook_t __rcu *br_should_route_hook __read_mostly;
|
||||
@@ -57,7 +58,7 @@ static int br_pass_frame_up(struct sk_buff *skb)
|
||||
|
||||
indev = skb->dev;
|
||||
skb->dev = brdev;
|
||||
skb = br_handle_vlan(br, vg, skb);
|
||||
skb = br_handle_vlan(br, NULL, vg, skb);
|
||||
if (!skb)
|
||||
return NET_RX_DROP;
|
||||
/* update the multicast stats if the packet is IGMP/MLD */
|
||||
@@ -261,6 +262,11 @@ rx_handler_result_t br_handle_frame(struct sk_buff **pskb)
|
||||
return RX_HANDLER_CONSUMED;
|
||||
|
||||
p = br_port_get_rcu(skb->dev);
|
||||
if (p->flags & BR_VLAN_TUNNEL) {
|
||||
if (br_handle_ingress_vlan_tunnel(skb, p,
|
||||
nbp_vlan_group_rcu(p)))
|
||||
goto drop;
|
||||
}
|
||||
|
||||
if (unlikely(is_link_local_ether_addr(dest))) {
|
||||
u16 fwd_mask = p->br->group_fwd_mask_required;
|
||||
|
||||
Reference in New Issue
Block a user