ipv6: Fix handling of LLA with VRF and sockets bound to VRF
authorDavid Ahern <dsahern@gmail.com>
Wed, 12 Dec 2018 23:27:38 +0000 (15:27 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:17:34 +0000 (09:17 +0100)
commit2b3541ffdd05198b329d21920a0f606009a1058b
tree940debc2f34ba367861b7c4111d89fdce0304f4c
parent091ed093c9c8a1c4c0243924131c8344383aeec3
ipv6: Fix handling of LLA with VRF and sockets bound to VRF

[ Upstream commit c2027d1e17582903e368abf5d4838b22a98f2b7b ]

A recent commit allows sockets bound to a VRF to receive ipv6 link local
packets. However, it only works for UDP and worse TCP connection attempts
to the LLA with the only listener bound to the VRF just hang where as
before the client gets a reset and connection refused. Fix by adjusting
ir_iif for LL addresses and packets received through a device enslaved
to a VRF.

Fixes: 6f12fa775530 ("vrf: mark skb for multicast or link-local as enslaved to VRF")
Reported-by: Donald Sharp <sharpd@cumulusnetworks.com>
Cc: Mike Manning <mmanning@vyatta.att-mail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/tcp_ipv6.c