summaryrefslogtreecommitdiffstats
path: root/drivers/net/geneve.c
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2019-12-04 15:35:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-18 16:05:50 +0100
commitfe0cacb0f518d76cf4a71322a464eb0713969318 (patch)
tree4671ef4fda209c6df27f42644235aa1940c39406 /drivers/net/geneve.c
parentc583801c033c45af9a451ddc9512b6b375d7656a (diff)
downloadlinux-stable-fe0cacb0f518d76cf4a71322a464eb0713969318.tar.gz
linux-stable-fe0cacb0f518d76cf4a71322a464eb0713969318.tar.bz2
linux-stable-fe0cacb0f518d76cf4a71322a464eb0713969318.zip
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
[ Upstream commit 6c8991f41546c3c472503dff1ea9daaddf9331c2 ] ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_output helpers) for their IPv4 lookups, which calls xfrm_lookup_route(). This patch fixes this inconsistent behavior by switching the stub to ip6_dst_lookup_flow, which also calls xfrm_lookup_route(). This requires some changes in all the callers, as these two functions take different arguments and have different return types. Fixes: 5f81bd2e5d80 ("ipv6: export a stub for IPv6 symbols used by vxlan") Reported-by: Xiumei Mu <xmu@redhat.com> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/geneve.c')
-rw-r--r--drivers/net/geneve.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index cb2ea8facd8d..ac1470a6c64f 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -853,7 +853,9 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb,
if (dst)
return dst;
}
- if (ipv6_stub->ipv6_dst_lookup(geneve->net, gs6->sock->sk, &dst, fl6)) {
+ dst = ipv6_stub->ipv6_dst_lookup_flow(geneve->net, gs6->sock->sk, fl6,
+ NULL);
+ if (IS_ERR(dst)) {
netdev_dbg(dev, "no route to %pI6\n", &fl6->daddr);
return ERR_PTR(-ENETUNREACH);
}