From 83765d060ca6f81415f03cf33681a7bb46a4f365 Mon Sep 17 00:00:00 2001
From: "Mohamed S. Mahmoud" <mmahmoud@redhat.com>
Date: Mon, 22 Jan 2024 07:17:49 -0500
Subject: [PATCH] use unknown for interface we can't detect instead of ""
 (#250)

Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
---
 pkg/utils/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
index c2a4c80e..a5eedfba 100644
--- a/pkg/utils/utils.go
+++ b/pkg/utils/utils.go
@@ -95,7 +95,7 @@ func utsnameStr[T int8 | uint8](in []T) string {
 func GetInterfaceName(ifIndex uint32) string {
 	iface, err := net.InterfaceByIndex(int(ifIndex))
 	if err != nil {
-		return ""
+		return "unknown"
 	}
 	return iface.Name
 }
-- 
GitLab