aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/socket.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-12-08 13:46:21 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-12 12:23:45 +0100
commit513c6437283f265d7f60d762585a431eb44892cc (patch)
tree368863253f34bd24d12054eac362edbca1bab855 /src/socket.c
parentversion: bump snapshot (diff)
downloadwireguard-linux-compat-513c6437283f265d7f60d762585a431eb44892cc.tar.xz
wireguard-linux-compat-513c6437283f265d7f60d762585a431eb44892cc.zip
socket: convert to ipv6_dst_lookup_flow for 5.5
Upstream changed the API, so we introduce this super insane compat hack to make everything work again. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--src/socket.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/socket.c b/src/socket.c
index a90dadd..c46256d 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -142,9 +142,10 @@ static int send6(struct wg_device *wg, struct sk_buff *skb,
if (cache)
dst_cache_reset(cache);
}
- ret = ipv6_stub->ipv6_dst_lookup(sock_net(sock), sock, &dst,
- &fl);
- if (unlikely(ret)) {
+ dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
+ NULL);
+ if (unlikely(IS_ERR(dst))) {
+ ret = PTR_ERR(dst);
net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n",
wg->dev->name, &endpoint->addr, ret);
goto err;