netfilter: nft_fib_ipv6: skip ipv6 packets from any to link-local
authorFlorian Westphal <fw@strlen.de>
Tue, 8 Jun 2021 11:48:18 +0000 (13:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jun 2021 12:42:42 +0000 (14:42 +0200)
commit27e3d7da654d7fc3ca94efd19610ca18a2dea90d
treea020a34d47eb7bfced7bdb6701a3eb3e413100bc
parent5cea03aef609d84c5ac023e366c6629e66b405cf
netfilter: nft_fib_ipv6: skip ipv6 packets from any to link-local

[ Upstream commit 12f36e9bf678a81d030ca1b693dcda62b55af7c5 ]

The ip6tables rpfilter match has an extra check to skip packets with
"::" source address.

Extend this to ipv6 fib expression.  Else ipv6 duplicate address detection
packets will fail rpf route check -- lookup returns -ENETUNREACH.

While at it, extend the prerouting check to also cover the ingress hook.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1543
Fixes: f6d0cbcf09c5 ("netfilter: nf_tables: add fib expression")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/netfilter/nft_fib_ipv6.c