mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Fix IfName='none'
This commit is contained in:
		
							parent
							
								
									2e188917d8
								
							
						
					
					
						commit
						6d9d01dae1
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -37,6 +37,9 @@ func (tun *tunDevice) init(core *Core) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (tun *tunDevice) start(ifname string, iftapmode bool, addr string, mtu int) error {
 | 
					func (tun *tunDevice) start(ifname string, iftapmode bool, addr string, mtu int) error {
 | 
				
			||||||
 | 
						if ifname == "none" {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if err := tun.setup(ifname, iftapmode, addr, mtu); err != nil {
 | 
						if err := tun.setup(ifname, iftapmode, addr, mtu); err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue