mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-02-13 18:31:51 +00:00
Use existing constant
This commit is contained in:
parent
9fca3640f9
commit
d06c40ad19
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ func DefaultName() string {
|
||||||
func DefaultMTU() int {
|
func DefaultMTU() int {
|
||||||
ehbytes := 0
|
ehbytes := 0
|
||||||
if DefaultIsTAP() {
|
if DefaultIsTAP() {
|
||||||
ehbytes = 14
|
ehbytes = tun_ETHER_HEADER_LENGTH
|
||||||
}
|
}
|
||||||
return defaults.GetDefaults().DefaultIfMTU - ehbytes
|
return defaults.GetDefaults().DefaultIfMTU - ehbytes
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ func DefaultIsTAP() bool {
|
||||||
func MaximumMTU(iftapmode bool) int {
|
func MaximumMTU(iftapmode bool) int {
|
||||||
ehbytes := 0
|
ehbytes := 0
|
||||||
if iftapmode {
|
if iftapmode {
|
||||||
ehbytes = 14
|
ehbytes = tun_ETHER_HEADER_LENGTH
|
||||||
}
|
}
|
||||||
return defaults.GetDefaults().MaximumIfMTU - ehbytes
|
return defaults.GetDefaults().MaximumIfMTU - ehbytes
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue