aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-11-29 04:42:15 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-11-29 04:42:15 +0100
commit9f8ab3261c5e99c2b80d37479671b5992b8b80de (patch)
tree2569a0dde0b33a6efca17ab4d37dfe100b0de808
parentwg-quick: linux: have remove_iptables return true (diff)
downloadWireGuard-9f8ab3261c5e99c2b80d37479671b5992b8b80de.tar.xz
WireGuard-9f8ab3261c5e99c2b80d37479671b5992b8b80de.zip
send: use kfree_skb_list
-rw-r--r--src/send.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/send.c b/src/send.c
index 62f1a97..3da27d6 100644
--- a/src/send.c
+++ b/src/send.c
@@ -236,13 +236,6 @@ void wg_packet_send_keepalive(struct wg_peer *peer)
#define skb_walk_null_queue_safe(first, skb, next) \
for (skb = first, next = skb->next; skb; \
skb = next, next = skb ? skb->next : NULL)
-static void skb_free_null_queue(struct sk_buff *first)
-{
- struct sk_buff *skb, *next;
-
- skb_walk_null_queue_safe(first, skb, next)
- dev_kfree_skb(skb);
-}
static void wg_packet_create_data_done(struct sk_buff *first,
struct wg_peer *peer)
@@ -284,7 +277,7 @@ void wg_packet_tx_worker(struct work_struct *work)
if (likely(state == PACKET_STATE_CRYPTED))
wg_packet_create_data_done(first, peer);
else
- skb_free_null_queue(first);
+ kfree_skb_list(first);
wg_noise_keypair_put(keypair, false);
wg_peer_put(peer);
@@ -343,7 +336,7 @@ err:
return;
wg_noise_keypair_put(PACKET_CB(first)->keypair, false);
wg_peer_put(peer);
- skb_free_null_queue(first);
+ kfree_skb_list(first);
}
void wg_packet_purge_staged_packets(struct wg_peer *peer)