Get broadcast addr in AddrList

Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
This commit is contained in:
Pengfei Ni 2017-04-29 22:25:32 +08:00 committed by Vish Ishaya
parent 2632e243fb
commit 1e045880fb
1 changed files with 2 additions and 0 deletions

View File

@ -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)),
}
addr.IPNet = local
case syscall.IFA_BROADCAST:
addr.Broadcast = attr.Value
case syscall.IFA_LABEL:
addr.Label = string(attr.Value[:len(attr.Value)-1])
case IFA_FLAGS: