From fc5a223eaf6cabe7184cc3d4563f781d07dac132 Mon Sep 17 00:00:00 2001 From: Joris Bonnefoy Date: Thu, 21 Oct 2021 17:24:20 +0200 Subject: [PATCH] Set NetNsId to -1 when attr is not specified --- link_linux.go | 1 + 1 file changed, 1 insertion(+) diff --git a/link_linux.go b/link_linux.go index 5f68dc1..ad8447b 100644 --- a/link_linux.go +++ b/link_linux.go @@ -1707,6 +1707,7 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { base.RawFlags = msg.Flags base.Flags = linkFlags(msg.Flags) base.EncapType = msg.EncapType() + base.NetNsID = -1 if msg.Flags&unix.IFF_PROMISC != 0 { base.Promisc = 1 }