From f3061ef67cb9a3786852f20237d69909b9cfef51 Mon Sep 17 00:00:00 2001 From: bobz965 Date: Fri, 13 Sep 2024 13:51:46 +0800 Subject: [PATCH] fix: mac arm64 run netlink ut (#4511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: mac arm64 run netlink ut --------- Signed-off-by: bobz965 Co-authored-by: 张祖建 --- pkg/util/arp_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/util/arp_test.go b/pkg/util/arp_test.go index 74a01f2a105..1166a7709bc 100644 --- a/pkg/util/arp_test.go +++ b/pkg/util/arp_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/vishvananda/netlink" + "golang.org/x/sys/unix" ) func TestMacEqual(t *testing.T) { @@ -54,7 +55,7 @@ func TestMacEqual(t *testing.T) { func TestArpResolve(t *testing.T) { // get the default route gw and nic - routes, err := netlink.RouteList(nil, netlink.FAMILY_ALL) + routes, err := netlink.RouteList(nil, unix.AF_UNSPEC) if err != nil { t.Fatalf("failed to get routes: %v", err) }