/*
GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
)
// Return maximal acceptable TAP interface MTU. This is daemon's MTU
-// minus nonce, MAC, packet size mark and Ethernet header sizes.
+// minus nonce, MAC, pad and Ethernet header sizes.
func TAPMaxMTU() int {
- return MTU - poly1305.TagSize - NonceSize - PktSizeSize - EtherSize
+ return MTU - poly1305.TagSize - NonceSize - 1 - EtherSize
}
func NewTAP(ifaceName string) (*TAP, error) {