nft_set_pktinfo_ipv6_validate does nothing unless CONFIG_IPV6, and therefore by implication CONFIG_NF_TABLES_IPV6, is enabled. Wrap the calls in a CONFIG_NF_TABLES_IPV6 check. Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx> --- net/netfilter/nft_chain_filter.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/netfilter/nft_chain_filter.c b/net/netfilter/nft_chain_filter.c index b5d5d071d765..f411d9993612 100644 --- a/net/netfilter/nft_chain_filter.c +++ b/net/netfilter/nft_chain_filter.c @@ -207,9 +207,11 @@ nft_do_chain_bridge(void *priv, case htons(ETH_P_IP): nft_set_pktinfo_ipv4_validate(&pkt, skb); break; +#ifdef CONFIG_NF_TABLES_IPV6 case htons(ETH_P_IPV6): nft_set_pktinfo_ipv6_validate(&pkt, skb); break; +#endif default: nft_set_pktinfo_unspec(&pkt, skb); break; @@ -262,9 +264,11 @@ static unsigned int nft_do_chain_netdev(void *priv, struct sk_buff *skb, case htons(ETH_P_IP): nft_set_pktinfo_ipv4_validate(&pkt, skb); break; +#ifdef CONFIG_NF_TABLES_IPV6 case htons(ETH_P_IPV6): nft_set_pktinfo_ipv6_validate(&pkt, skb); break; +#endif default: nft_set_pktinfo_unspec(&pkt, skb); break; -- 2.23.0.rc1