diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_payload.c index b2b63c3653d495b2a4c022fd132c1a068cea6786..56f6c05362ae80bdc08a1bbaad616b0d05efb254 100644 --- a/net/netfilter/nft_payload.c +++ b/net/netfilter/nft_payload.c @@ -93,7 +93,7 @@ void nft_payload_eval(const struct nft_expr *expr, switch (priv->base) { case NFT_PAYLOAD_LL_HEADER: - if (!skb_mac_header_was_set(skb)) + if (!skb_mac_header_was_set(skb) || skb_mac_header_len(skb) == 0) goto err; if (skb_vlan_tag_present(skb)) {