From d06c40ad19dca10fa0c106be3cffe88ec1f0ea41 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 20 Nov 2019 22:40:48 +0000 Subject: [PATCH] Use existing constant --- src/tuntap/tun.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tuntap/tun.go b/src/tuntap/tun.go index c9a627a0..d5bed523 100644 --- a/src/tuntap/tun.go +++ b/src/tuntap/tun.go @@ -102,7 +102,7 @@ func DefaultName() string { func DefaultMTU() int { ehbytes := 0 if DefaultIsTAP() { - ehbytes = 14 + ehbytes = tun_ETHER_HEADER_LENGTH } return defaults.GetDefaults().DefaultIfMTU - ehbytes } @@ -119,7 +119,7 @@ func DefaultIsTAP() bool { func MaximumMTU(iftapmode bool) int { ehbytes := 0 if iftapmode { - ehbytes = 14 + ehbytes = tun_ETHER_HEADER_LENGTH } return defaults.GetDefaults().MaximumIfMTU - ehbytes }