mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03: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 {
 | 
			
		||||
	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…
	
	Add table
		Add a link
		
	
		Reference in a new issue