mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-10-31 09:15:07 +03:00 
			
		
		
		
	Update platform defaults, handling of 'auto' on Linux/Darwin
This commit is contained in:
		
							parent
							
								
									15726fe90d
								
							
						
					
					
						commit
						7d00206f4b
					
				
					 6 changed files with 9 additions and 28 deletions
				
			
		|  | @ -17,6 +17,9 @@ import ( | |||
| 
 | ||||
| // Configures the "utun" adapter with the correct IPv6 address and MTU. | ||||
| func (tun *TunAdapter) setup(ifname string, addr string, mtu int) error { | ||||
| 	if ifname == "auto" { | ||||
| 		ifname = "utun" | ||||
| 	} | ||||
| 	iface, err := wgtun.CreateTUN(ifname, mtu) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
|  |  | |||
|  | @ -11,6 +11,9 @@ import ( | |||
| 
 | ||||
| // Configures the TUN adapter with the correct IPv6 address and MTU. | ||||
| func (tun *TunAdapter) setup(ifname string, addr string, mtu int) error { | ||||
| 	if ifname == "auto" { | ||||
| 		ifname = "\000" | ||||
| 	} | ||||
| 	iface, err := wgtun.CreateTUN(ifname, mtu) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neil Alexander
						Neil Alexander