From 0e35fb2f99ce4c249c0a42ad93a597835ae742b5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 4 Feb 2025 14:23:14 -0800 Subject: [PATCH] net: ignore unnamed interfaces on DragonFly On DragonFly it seems that we can see an unnamed interface, but be unable to retrieve it. Skip unnamed interface cases. For #71064 Change-Id: Ie9af74bd656d403ddc19cc5f14062cd8e0fa2571 Reviewed-on: https://go-review.googlesource.com/c/go/+/646675 LUCI-TryBot-Result: Go LUCI Reviewed-by: Damien Neil Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor --- src/internal/routebsd/interface_classic.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/internal/routebsd/interface_classic.go b/src/internal/routebsd/interface_classic.go index af9531c0df..2599e5dd59 100644 --- a/src/internal/routebsd/interface_classic.go +++ b/src/internal/routebsd/interface_classic.go @@ -41,6 +41,12 @@ func (w *wireFormat) parseInterfaceMessage(b []byte) (Message, error) { } m.Addrs[syscall.RTAX_IFP] = a m.Name = a.(*LinkAddr).Name + } else { + // DragonFly seems to have unnamed interfaces + // that we can't look up again. Just skip them. + if runtime.GOOS == "dragonfly" { + return nil, nil + } } return m, nil -- 2.51.0