mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-03-09 15:40:15 +00:00 
			
		
		
		
	Normalise startup output for TUN/TAP on Linux and Windows
This commit is contained in:
		
							parent
							
								
									df9cadd938
								
							
						
					
					
						commit
						55b56e8686
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		|  | @ -37,6 +37,10 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int) | ||||||
| 			tun.mtu = 65535-tun_ETHER_HEADER_LENGTH | 			tun.mtu = 65535-tun_ETHER_HEADER_LENGTH | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	// Friendly output | ||||||
|  | 	tun.core.log.Printf("Interface name: %s", tun.iface.Name()) | ||||||
|  | 	tun.core.log.Printf("Interface IPv6: %s", addr) | ||||||
|  | 	tun.core.log.Printf("Interface MTU: %d", tun.mtu) | ||||||
| 	return tun.setupAddress(addr) | 	return tun.setupAddress(addr) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -57,6 +57,10 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		panic(err) | 		panic(err) | ||||||
| 	} | 	} | ||||||
|  | 	// Friendly output | ||||||
|  | 	tun.core.log.Printf("Interface name: %s", tun.iface.Name()) | ||||||
|  | 	tun.core.log.Printf("Interface IPv6: %s", addr) | ||||||
|  | 	tun.core.log.Printf("Interface MTU: %d", tun.mtu) | ||||||
| 	return tun.setupAddress(addr) | 	return tun.setupAddress(addr) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue