diff --git a/link.go b/link.go index ca47d05a..5b9d8b62 100644 --- a/link.go +++ b/link.go @@ -41,6 +41,7 @@ type LinkAttrs struct { EncapType string Protinfo *Protinfo OperState LinkOperState + PhysSwitchID int NetNsID int NumTxQueues int NumRxQueues int diff --git a/link_linux.go b/link_linux.go index cab22422..db540e43 100644 --- a/link_linux.go +++ b/link_linux.go @@ -1903,6 +1903,8 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { } case unix.IFLA_OPERSTATE: base.OperState = LinkOperState(uint8(attr.Value[0])) + case unix.IFLA_PHYS_SWITCH_ID: + base.PhysSwitchID = int(native.Uint32(attr.Value[0:4])) case unix.IFLA_LINK_NETNSID: base.NetNsID = int(native.Uint32(attr.Value[0:4])) case unix.IFLA_GSO_MAX_SIZE: