diff options
author | Paolo Abeni <pabeni@redhat.com> | 2016-01-29 12:30:19 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-03 15:07:05 -0800 |
commit | e8e729ccd2fee9f0445c4949a1aa7dd610bfa8bd (patch) | |
tree | 013fc6f575f9f1ef571fd2858661e9141c8465a3 /init/main.c | |
parent | 87e40d8d8ba965003611a8bdbe18019d344d9d58 (diff) | |
download | linux-stable-e8e729ccd2fee9f0445c4949a1aa7dd610bfa8bd.tar.gz linux-stable-e8e729ccd2fee9f0445c4949a1aa7dd610bfa8bd.tar.bz2 linux-stable-e8e729ccd2fee9f0445c4949a1aa7dd610bfa8bd.zip |
ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail()
[ Upstream commit 6f21c96a78b835259546d8f3fb4edff0f651d478 ]
The current implementation of ip6_dst_lookup_tail basically
ignore the egress ifindex match: if the saddr is set,
ip6_route_output() purposefully ignores flowi6_oif, due
to the commit d46a9d678e4c ("net: ipv6: Dont add RT6_LOOKUP_F_IFACE
flag if saddr set"), if the saddr is 'any' the first route lookup
in ip6_dst_lookup_tail fails, but upon failure a second lookup will
be performed with saddr set, thus ignoring the ifindex constraint.
This commit adds an output route lookup function variant, which
allows the caller to specify lookup flags, and modify
ip6_dst_lookup_tail() to enforce the ifindex match on the second
lookup via said helper.
ip6_route_output() becames now a static inline function build on
top of ip6_route_output_flags(); as a side effect, out-of-tree
modules need now a GPL license to access the output route lookup
functionality.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions