Skip to content
Snippets Groups Projects
Unverified Commit 83765d06 authored by Mohamed S. Mahmoud's avatar Mohamed S. Mahmoud Committed by GitHub
Browse files

use unknown for interface we can't detect instead of "" (#250)

parent e100947a
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ func utsnameStr[T int8 | uint8](in []T) string { ...@@ -95,7 +95,7 @@ func utsnameStr[T int8 | uint8](in []T) string {
func GetInterfaceName(ifIndex uint32) string { func GetInterfaceName(ifIndex uint32) string {
iface, err := net.InterfaceByIndex(int(ifIndex)) iface, err := net.InterfaceByIndex(int(ifIndex))
if err != nil { if err != nil {
return "" return "unknown"
} }
return iface.Name return iface.Name
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment