mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
Use existing constant
This commit is contained in:
parent
9fca3640f9
commit
d06c40ad19
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user