diff options
author | Florent Daigniere <nextgens@freenetproject.org> | 2019-02-23 14:14:09 +0100 |
---|---|---|
committer | Florent Daigniere <nextgens@freenetproject.org> | 2019-02-23 14:14:09 +0100 |
commit | 9e686cd714a371ad5f35f356fe88f018fa5e92e6 (patch) | |
tree | 334ca9bac98f8af1c2d30b102c88c3530faf0418 /peer.go | |
parent | 42c6d0e2614414590361123344b7918c9bcc6430 (diff) | |
download | wireguard-go-9e686cd714a371ad5f35f356fe88f018fa5e92e6.tar.gz wireguard-go-9e686cd714a371ad5f35f356fe88f018fa5e92e6.zip |
send: propagate DSCP bits to the outer tunnel
Like many, I am using WiFi a lot and often on congested networks.
Without this, Wireguard strips the DSCP bits, preventing WME from
kicking in and improving the audio/video experience.
Yes, it's technically an information leak. Who cares? It's not like if
traffic analysis based on packet sizes or timings wasn't a thing.
This is the first patch of the serie, more work has to happen on ECN
Signed-off-by: Florent Daigniere <nextgens@freenetproject.org>
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -125,7 +125,7 @@ func (device *Device) NewPeer(pk NoisePublicKey) (*Peer, error) { return peer, nil } -func (peer *Peer) SendBuffer(buffer []byte) error { +func (peer *Peer) SendBuffer(buffer []byte, tos byte) error { peer.device.net.RLock() defer peer.device.net.RUnlock() @@ -140,7 +140,7 @@ func (peer *Peer) SendBuffer(buffer []byte) error { return errors.New("no known endpoint for peer") } - return peer.device.net.bind.Send(buffer, peer.endpoint) + return peer.device.net.bind.Send(buffer, peer.endpoint, tos) } func (peer *Peer) String() string { |