diff options
author | Simon Rozman <simon@rozman.si> | 2019-02-06 20:22:04 +0100 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2019-02-06 20:22:04 +0100 |
commit | 46279ad0f9561fb98c562c2c9dcc3f431357b26b (patch) | |
tree | b000f2720b6cece6235d3bf9cb78a676b4295c9b /tun/tun_windows.go | |
parent | 73df1c08719960c7002e521ce7466d1cc9e93ca6 (diff) |
tun_windows: Stop checking minimum size of received TUN packets
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r-- | tun/tun_windows.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go index a9b29d2..0e64155 100644 --- a/tun/tun_windows.go +++ b/tun/tun_windows.go @@ -15,7 +15,6 @@ import ( ) const ( - TUN_MIN_PACKET_SIZE = 20 TUN_MAX_PACKET_SIZE = 1600 TUN_MAX_PACKET_EXCHANGE = 256 // Number of packets that can be exchanged at a time TUN_EXCHANGE_BUFFER_SIZE = 410632 @@ -176,7 +175,7 @@ func (tun *nativeTun) Read(buff []byte, offset int) (int, error) { tunPacket := &tun.rdBuff.packets[tun.rdNextPacket] tun.rdNextPacket++ - if tunPacket.size < TUN_MIN_PACKET_SIZE || TUN_MAX_PACKET_SIZE < tunPacket.size { + if TUN_MAX_PACKET_SIZE < tunPacket.size { // Invalid packet size. continue } |