mirror of https://github.com/vishvananda/netlink
Get broadcast addr in AddrList
Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
This commit is contained in:
parent
2632e243fb
commit
1e045880fb
|
@ -195,6 +195,8 @@ func parseAddr(m []byte) (addr Addr, family, index int, err error) {
|
||||||
Mask: net.CIDRMask(int(msg.Prefixlen), 8*len(attr.Value)),
|
Mask: net.CIDRMask(int(msg.Prefixlen), 8*len(attr.Value)),
|
||||||
}
|
}
|
||||||
addr.IPNet = local
|
addr.IPNet = local
|
||||||
|
case syscall.IFA_BROADCAST:
|
||||||
|
addr.Broadcast = attr.Value
|
||||||
case syscall.IFA_LABEL:
|
case syscall.IFA_LABEL:
|
||||||
addr.Label = string(attr.Value[:len(attr.Value)-1])
|
addr.Label = string(attr.Value[:len(attr.Value)-1])
|
||||||
case IFA_FLAGS:
|
case IFA_FLAGS:
|
||||||
|
|
Loading…
Reference in New Issue