bridge: Validate that vlan is permitted on ingress
When a frame arrives on a port or transmitted by the bridge, if we have VLANs configured, validate that a given VLAN is allowed to enter the bridge. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
243a2e63f5
commit
a37b85c9fb
@@ -17,6 +17,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/netfilter_bridge.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/rculist.h>
|
||||
#include "br_private.h"
|
||||
|
||||
/* Hook for brouter */
|
||||
@@ -54,6 +55,9 @@ int br_handle_frame_finish(struct sk_buff *skb)
|
||||
if (!p || p->state == BR_STATE_DISABLED)
|
||||
goto drop;
|
||||
|
||||
if (!br_allowed_ingress(p->br, nbp_get_vlan_info(p), skb))
|
||||
goto drop;
|
||||
|
||||
/* insert into forwarding database after filtering to avoid spoofing */
|
||||
br = p->br;
|
||||
br_fdb_update(br, p, eth_hdr(skb)->h_source);
|
||||
|
Reference in New Issue
Block a user