aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-25 11:25:24 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-25 13:08:01 +0100
commitcf8c39531b788cbb95af72fdea78dbaeeb3ce2c1 (patch)
treec7f3920d2bb8f895d5a912b3b497e477ca6c335f
parentallowedips: do not use __always_inline (diff)
downloadWireGuard-cf8c39531b788cbb95af72fdea78dbaeeb3ce2c1.tar.xz
WireGuard-cf8c39531b788cbb95af72fdea78dbaeeb3ce2c1.zip
device: use skb accessor functions where possible
Suggested-by: David Miller <davem@davemloft.net>
-rw-r--r--src/device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index 779c4152..87359350 100644
--- a/src/device.c
+++ b/src/device.c
@@ -162,7 +162,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
__skb_queue_head_init(&packets);
if (!skb_is_gso(skb)) {
- skb->next = NULL;
+ skb_mark_not_on_list(skb);
} else {
struct sk_buff *segs = skb_gso_segment(skb, 0);
@@ -175,7 +175,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
}
do {
next = skb->next;
- skb->next = skb->prev = NULL;
+ skb_mark_not_on_list(skb);
skb = skb_share_check(skb, GFP_ATOMIC);
if (unlikely(!skb))