aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-12-04 12:27:13 -0800
committerDavid S. Miller <davem@davemloft.net>2019-12-04 12:27:13 -0800
commit7b3b209e61adf575faf21d08a47f6a842b7b0767 (patch)
treef35ea6d60e5b15d2b0cb6bc8500849e6c9de2cfe /net/core
parentcls_flower: Fix the behavior using port ranges with hw-offload (diff)
parentnet: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup (diff)
downloadwireguard-linux-7b3b209e61adf575faf21d08a47f6a842b7b0767.tar.xz
wireguard-linux-7b3b209e61adf575faf21d08a47f6a842b7b0767.zip
Merge branch 'net-convert-ipv6_stub-to-ip6_dst_lookup_flow'
Sabrina Dubroca says: ==================== net: convert ipv6_stub to ip6_dst_lookup_flow Xiumei Mu reported a bug in a VXLAN over IPsec setup: IPv6 | ESP | VXLAN Using this setup, packets go out unencrypted, because VXLAN over IPv6 gets its route from ipv6_stub->ipv6_dst_lookup (in vxlan6_get_route), which doesn't perform an XFRM lookup. This patchset first makes ip6_dst_lookup_flow suitable for some existing users of ipv6_stub->ipv6_dst_lookup by adding a 'net' argument, then converts all those users. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/lwt_bpf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/core/lwt_bpf.c b/net/core/lwt_bpf.c
index 74cfb8b5ab33..99a6de52b21d 100644
--- a/net/core/lwt_bpf.c
+++ b/net/core/lwt_bpf.c
@@ -230,9 +230,7 @@ static int bpf_lwt_xmit_reroute(struct sk_buff *skb)
fl6.daddr = iph6->daddr;
fl6.saddr = iph6->saddr;
- err = ipv6_stub->ipv6_dst_lookup(net, skb->sk, &dst, &fl6);
- if (unlikely(err))
- goto err;
+ dst = ipv6_stub->ipv6_dst_lookup_flow(net, skb->sk, &fl6, NULL);
if (IS_ERR(dst)) {
err = PTR_ERR(dst);
goto err;