netfilter: ipv6: Preserve link scope traffic original oif
authorAlin Nastac <alin.nastac@gmail.com>
Wed, 21 Nov 2018 13:00:30 +0000 (14:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:28:51 +0000 (09:28 +0100)
commit97f048033a07b199b98d5e8f10f1022f10d42ed4
treef143aed6394d33de308db712518efee616426a7d
parentf47b8824a83057e9f63d39df86332ffeb703311f
netfilter: ipv6: Preserve link scope traffic original oif

[ Upstream commit 508b09046c0f21678652fb66fd1e9959d55591d2 ]

When ip6_route_me_harder is invoked, it resets outgoing interface of:
  - link-local scoped packets sent by neighbor discovery
  - multicast packets sent by MLD host
  - multicast packets send by MLD proxy daemon that sets outgoing
    interface through IPV6_PKTINFO ipi6_ifindex

Link-local and multicast packets must keep their original oif after
ip6_route_me_harder is called.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/netfilter.c