nft_payload: rebuild vlan header when needed
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 nft_payload: rebuild vlan header when needed
Skip rebuilding the vlan header when accessing destination and source mac address.
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nft_payload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/netfilter/nft_payload.c +2 -1
@@ -171,7 +171,8 @@ void nft_payload_eval(const struct nft_expr *expr,if (!skb_mac_header_was_set (skb)) goto err; -if (skb_vlan_tag_present (skb)) { +if (skb_vlan_tag_present (skb) && + priv->offset >= offsetof(struct ethhdr , h_proto)) {if (!nft_payload_copy_vlan (dest, skb, priv->offset, priv->len)) goto err;
Signature · 1 line
2.30.2