diff --git a/link.go b/link.go index 0e46eee..28780d1 100644 --- a/link.go +++ b/link.go @@ -55,6 +55,7 @@ type LinkAttrs struct { GROIPv4MaxSize uint32 Vfs []VfInfo // virtual functions available on link Group uint32 + PermHWAddr net.HardwareAddr Slave LinkSlave } diff --git a/link_linux.go b/link_linux.go index 717be79..989abea 100644 --- a/link_linux.go +++ b/link_linux.go @@ -2246,6 +2246,13 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { base.NumRxQueues = int(native.Uint32(attr.Value[0:4])) case unix.IFLA_GROUP: base.Group = native.Uint32(attr.Value[0:4]) + case unix.IFLA_PERM_ADDRESS: + for _, b := range attr.Value { + if b != 0 { + base.PermHWAddr = attr.Value[:] + break + } + } } }