mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-11-01 04:32:40 +08:00 
			
		
		
		
	added comments, optimized memory
This commit is contained in:
		| @@ -685,10 +685,14 @@ func isInterfacePresent(iface string, address string) (string, bool) { | ||||
| 		for _, addr := range currAddrs { | ||||
| 			if strings.Contains(addr.String(), address) && currIface.Name != iface { | ||||
| 				logger.Log(2, "found iface", addr.String(), currIface.Name) | ||||
| 				interfaces = nil | ||||
| 				currAddrs = nil | ||||
| 				return currIface.Name, false | ||||
| 			} | ||||
| 		} | ||||
| 		currAddrs = nil | ||||
| 	} | ||||
| 	interfaces = nil | ||||
| 	logger.Log(2, "failed to find iface", iface) | ||||
| 	return "", true | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 0xdcarns
					0xdcarns