diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-24 02:18:05 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-26 12:35:06 +0200 |
commit | 2ea6d61f8ca145434d1413dc1507be186cc9a991 (patch) | |
tree | 0cccd9b350e7620c6694062bdc725b379a1efddf /src/socket.c | |
parent | socket: verify saddr belongs to interface (diff) | |
download | wireguard-monolithic-historical-2ea6d61f8ca145434d1413dc1507be186cc9a991.tar.xz wireguard-monolithic-historical-2ea6d61f8ca145434d1413dc1507be186cc9a991.zip |
socket: use ip_rt_put instead of dst_release
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c index 76e4e24..332a682 100644 --- a/src/socket.c +++ b/src/socket.c @@ -50,7 +50,7 @@ static inline int send4(struct wireguard_device *wg, struct sk_buff *skb, struct if (cache) dst_cache_reset(cache); if (!IS_ERR(rt)) - dst_release(&rt->dst); + ip_rt_put(rt); rt = ip_route_output_flow(sock_net(sock), &fl, sock); } if (unlikely(IS_ERR(rt))) { @@ -58,7 +58,7 @@ static inline int send4(struct wireguard_device *wg, struct sk_buff *skb, struct net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n", netdev_pub(wg)->name, &endpoint->addr, ret); goto err; } else if (unlikely(rt->dst.dev == skb->dev)) { - dst_release(&rt->dst); + ip_rt_put(rt); ret = -ELOOP; net_dbg_ratelimited("%s: Avoiding routing loop to %pISpfsc\n", netdev_pub(wg)->name, &endpoint->addr); goto err; |