From 0c7763e0e5b1bd6c6aa4087f70fb903a8cdf7c23 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 19 Oct 2017 04:41:13 +0200 Subject: stats: more robust accounting Signed-off-by: Jason A. Donenfeld --- src/socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/socket.c') diff --git a/src/socket.c b/src/socket.c index 8d0e9ca..913ad0a 100644 --- a/src/socket.c +++ b/src/socket.c @@ -173,6 +173,7 @@ int socket_send_buffer_to_peer(struct wireguard_peer *peer, void *buffer, size_t return -ENOMEM; skb_reserve(skb, SKB_HEADER_LEN); + skb_set_inner_network_header(skb, 0); memcpy(skb_put(skb, len), buffer, len); return socket_send_skb_to_peer(peer, skb, ds); } @@ -193,6 +194,7 @@ int socket_send_buffer_as_reply_to_skb(struct wireguard_device *wg, struct sk_bu if (unlikely(!skb)) return -ENOMEM; skb_reserve(skb, SKB_HEADER_LEN); + skb_set_inner_network_header(skb, 0); memcpy(skb_put(skb, len), out_buffer, len); if (endpoint.addr.sa_family == AF_INET) -- cgit v1.2.3