aboutsummaryrefslogtreecommitdiffstats
path: root/src/tun.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-15 16:27:59 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-15 16:27:59 +0200
commitdd4da93749fd9a8a231942a6b75ad137cc308e02 (patch)
tree187c4d0257e4216ea332cd09d19f6b50041b0791 /src/tun.go
parentConforming to the cross-platform UX (diff)
downloadwireguard-go-dd4da93749fd9a8a231942a6b75ad137cc308e02.tar.xz
wireguard-go-dd4da93749fd9a8a231942a6b75ad137cc308e02.zip
Added padding
Added plaintext padding and fixed default interface MTU
Diffstat (limited to 'src/tun.go')
-rw-r--r--src/tun.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tun.go b/src/tun.go
index 85735a6..f529c54 100644
--- a/src/tun.go
+++ b/src/tun.go
@@ -1,5 +1,11 @@
package main
+/*
+ * The default MTU of the new device must be 1420
+ */
+
+const DefaultMTU = 1420
+
type TUNDevice interface {
Read([]byte) (int, error) // read a packet from the device (without any additional headers)
Write([]byte) (int, error) // writes a packet to the device (without any additional headers)