From: Ian Lance Taylor Date: Tue, 4 Feb 2025 22:23:14 +0000 (-0800) Subject: net: ignore unnamed interfaces on DragonFly X-Git-Tag: go1.25rc1~1170 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0e35fb2f99ce4c249c0a42ad93a597835ae742b5;p=gostls13.git 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 --- 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