Set NetNsId to -1 when attr is not specified

This commit is contained in:
Joris Bonnefoy 2021-10-21 17:24:20 +02:00 committed by Vish (Ishaya) Abrams
parent 187053b978
commit fc5a223eaf
1 changed files with 1 additions and 0 deletions

View File

@ -1707,6 +1707,7 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) {
base.RawFlags = msg.Flags base.RawFlags = msg.Flags
base.Flags = linkFlags(msg.Flags) base.Flags = linkFlags(msg.Flags)
base.EncapType = msg.EncapType() base.EncapType = msg.EncapType()
base.NetNsID = -1
if msg.Flags&unix.IFF_PROMISC != 0 { if msg.Flags&unix.IFF_PROMISC != 0 {
base.Promisc = 1 base.Promisc = 1
} }