mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
netfilter: nft_reject_bridge: enable reject with bridge vlan
commite9c284ec4bupstream. Currently, using the bridge reject target with tagged packets results in untagged packets being sent back. Fix this by mirroring the vlan id as well. Fixes:85f5b3086a("netfilter: bridge: add reject support") Signed-off-by: Michael Braun <michael-dev@fami-braun.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c67ec7f940
commit
b614b8642f
@@ -34,6 +34,12 @@ static void nft_reject_br_push_etherhdr(struct sk_buff *oldskb,
|
||||
ether_addr_copy(eth->h_dest, eth_hdr(oldskb)->h_source);
|
||||
eth->h_proto = eth_hdr(oldskb)->h_proto;
|
||||
skb_pull(nskb, ETH_HLEN);
|
||||
|
||||
if (skb_vlan_tag_present(oldskb)) {
|
||||
u16 vid = skb_vlan_tag_get(oldskb);
|
||||
|
||||
__vlan_hwaccel_put_tag(nskb, oldskb->vlan_proto, vid);
|
||||
}
|
||||
}
|
||||
|
||||
static int nft_bridge_iphdr_validate(struct sk_buff *skb)
|
||||
|
||||
Reference in New Issue
Block a user