vendor: Update vishvanana/netlink dependency

This commit is contained in:
Aithal
2017-02-23 09:53:11 -08:00
parent 7eeb21a999
commit 460e1c5be3
46 changed files with 1773 additions and 230 deletions

View File

@ -10,9 +10,11 @@ import (
// include a mask, so it stores the address as a net.IPNet.
type Addr struct {
*net.IPNet
Label string
Flags int
Scope int
Label string
Flags int
Scope int
Peer *net.IPNet
Broadcast net.IP
}
// String returns $ip/$netmask $label
@ -43,3 +45,10 @@ func (a Addr) Equal(x Addr) bool {
// ignore label for comparison
return a.IP.Equal(x.IP) && sizea == sizeb
}
func (a Addr) PeerEqual(x Addr) bool {
sizea, _ := a.Peer.Mask.Size()
sizeb, _ := x.Peer.Mask.Size()
// ignore label for comparison
return a.Peer.IP.Equal(x.Peer.IP) && sizea == sizeb
}