summaryrefslogtreecommitdiffhomepage
path: root/tun_linux.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-04-20 05:30:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-04-20 06:51:28 +0200
commitf5c256affdecc50ecf485b7ad54986ebb17e783a (patch)
tree780151889f7f23daa25be5656f0ffeaf0b093fee /tun_linux.go
parent4973ea0c9e6c8fd7093e8c1848533697d6b02a69 (diff)
Check for correct first nibble
The code before assumed that the flow label was always zero.
Diffstat (limited to 'tun_linux.go')
-rw-r--r--tun_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun_linux.go b/tun_linux.go
index a37b727..1abc86f 100644
--- a/tun_linux.go
+++ b/tun_linux.go
@@ -273,7 +273,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
buff[0] = 0x00
buff[1] = 0x00
- if buff[4] == ipv6.Version<<4 {
+ if buff[4]>>4 == ipv6.Version {
buff[2] = 0x86
buff[3] = 0xdd
} else {