diff --git a/src/device.c b/src/device.c index 40b9e5c..2cec1ec 100644 --- a/src/device.c +++ b/src/device.c @@ -143,6 +143,8 @@ static netdev_tx_t xmit(struct sk_buff *skb, struct net_device *dev) goto err_peer; } + skb_orphan(skb); + mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu; __skb_queue_head_init(&packets); diff --git a/src/socket.c b/src/socket.c index 663a462..1f8718a 100644 --- a/src/socket.c +++ b/src/socket.c @@ -293,6 +293,7 @@ static int receive(struct sock *sk, struct sk_buff *skb) wg = sk->sk_user_data; if (unlikely(!wg)) goto err; + skb_orphan(skb); packet_receive(wg, skb); return 0;