summaryrefslogtreecommitdiffhomepage
path: root/src/socket.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-06-24 02:18:05 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-06-26 12:35:06 +0200
commita8ab6d3b7ff9b91d3c1c7c1352b83486ed0772be (patch)
tree15c3d870e18dce731abf1c870ca0da44b39dbcc8 /src/socket.c
parent36fe0f3a410858990c992132b4ae8ba4bc511739 (diff)
socket: use ip_rt_put instead of dst_release
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c4
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;