diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-08-29 20:49:30 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-08-29 22:37:44 +0200 |
commit | be7efbeb3c9ae7719832d3cc145e4b2cb1c72b6a (patch) | |
tree | be174620b999679e5093bc4bf6b442973aa0c141 /src/socket.c | |
parent | 18acc219f623de2b7248de851390d76372d55616 (diff) |
send: properly encapsulate ECN
We're not leaking the DSCP, but we do deal with ECN.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/socket.c b/src/socket.c index 4720d4a..1299404 100644 --- a/src/socket.c +++ b/src/socket.c @@ -234,7 +234,7 @@ out: } -int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb, u8 dscp) +int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb, u8 ds) { struct net_device *dev = netdev_pub(peer->device); struct dst_entry *dst; @@ -255,7 +255,7 @@ int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb, u8 rcu_read_lock(); read_lock_bh(&peer->endpoint_lock); - ret = send(dev, skb, dst, &peer->endpoint_flow.fl4, &peer->endpoint_flow.fl6, &peer->endpoint_addr, rcu_dereference(peer->device->sock4), rcu_dereference(peer->device->sock6), dscp); + ret = send(dev, skb, dst, &peer->endpoint_flow.fl4, &peer->endpoint_flow.fl6, &peer->endpoint_addr, rcu_dereference(peer->device->sock4), rcu_dereference(peer->device->sock6), ds); if (!ret) peer->tx_bytes += skb_len; @@ -265,14 +265,14 @@ int socket_send_skb_to_peer(struct wireguard_peer *peer, struct sk_buff *skb, u8 return ret; } -int socket_send_buffer_to_peer(struct wireguard_peer *peer, void *buffer, size_t len, u8 dscp) +int socket_send_buffer_to_peer(struct wireguard_peer *peer, void *buffer, size_t len, u8 ds) { struct sk_buff *skb = alloc_skb(len + SKB_HEADER_LEN, GFP_ATOMIC); if (!skb) return -ENOMEM; skb_reserve(skb, SKB_HEADER_LEN); memcpy(skb_put(skb, len), buffer, len); - return socket_send_skb_to_peer(peer, skb, dscp); + return socket_send_skb_to_peer(peer, skb, ds); } static int send_to_sockaddr(struct sk_buff *skb, struct wireguard_device *wg, struct sockaddr_storage *addr, struct sock *sock4, struct sock *sock6) |