aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-11-29 13:02:19 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-11-29 13:02:19 +0100
commitf99a92c6946ad70187a4e6a4d990812c5da89079 (patch)
tree7890902650962b75b03c61b8b6d3df0c6d6458e0
parentdevice: prepare skb_list_walk_safe for upstreaming (diff)
downloadWireGuard-f99a92c6946ad70187a4e6a4d990812c5da89079.tar.xz
WireGuard-f99a92c6946ad70187a4e6a4d990812c5da89079.zip
send: avoid touching skb->{next,prev} directly
This isn't quite the same, since mark_not_on_list doesn't touch skb->prev, but hopefully it doesn't matter.
-rw-r--r--src/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c
index f9a06a3..a90dadd 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -31,7 +31,7 @@ static int send4(struct wg_device *wg, struct sk_buff *skb,
struct sock *sock;
int ret = 0;
- skb->next = skb->prev = NULL;
+ skb_mark_not_on_list(skb);
skb->dev = wg->dev;
skb->mark = wg->fwmark;
@@ -117,7 +117,7 @@ static int send6(struct wg_device *wg, struct sk_buff *skb,
struct sock *sock;
int ret = 0;
- skb->next = skb->prev = NULL;
+ skb_mark_not_on_list(skb);
skb->dev = wg->dev;
skb->mark = wg->fwmark;