Skip to content

Commit 83765d0

Browse files
authored
use unknown for interface we can't detect instead of "" (#250)
Signed-off-by: Mohamed Mahmoud <[email protected]>
1 parent e100947 commit 83765d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/utils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func utsnameStr[T int8 | uint8](in []T) string {
9595
func GetInterfaceName(ifIndex uint32) string {
9696
iface, err := net.InterfaceByIndex(int(ifIndex))
9797
if err != nil {
98-
return ""
98+
return "unknown"
9999
}
100100
return iface.Name
101101
}

0 commit comments

Comments
 (0)