build: update github.com/vishvananda/netlink to 1.3.0
This includes a breaking change:
acdc658b86
route.Dst is now a zero IPNet instead of nil
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
This commit is contained in:
146
vendor/github.com/vishvananda/netlink/link.go
generated
vendored
146
vendor/github.com/vishvananda/netlink/link.go
generated
vendored
@ -22,34 +22,41 @@ type (
|
||||
|
||||
// LinkAttrs represents data shared by most link types
|
||||
type LinkAttrs struct {
|
||||
Index int
|
||||
MTU int
|
||||
TxQLen int // Transmit Queue Length
|
||||
Name string
|
||||
HardwareAddr net.HardwareAddr
|
||||
Flags net.Flags
|
||||
RawFlags uint32
|
||||
ParentIndex int // index of the parent link device
|
||||
MasterIndex int // must be the index of a bridge
|
||||
Namespace interface{} // nil | NsPid | NsFd
|
||||
Alias string
|
||||
Statistics *LinkStatistics
|
||||
Promisc int
|
||||
Allmulti int
|
||||
Multi int
|
||||
Xdp *LinkXdp
|
||||
EncapType string
|
||||
Protinfo *Protinfo
|
||||
OperState LinkOperState
|
||||
PhysSwitchID int
|
||||
NetNsID int
|
||||
NumTxQueues int
|
||||
NumRxQueues int
|
||||
GSOMaxSize uint32
|
||||
GSOMaxSegs uint32
|
||||
Vfs []VfInfo // virtual functions available on link
|
||||
Group uint32
|
||||
Slave LinkSlave
|
||||
Index int
|
||||
MTU int
|
||||
TxQLen int // Transmit Queue Length
|
||||
Name string
|
||||
HardwareAddr net.HardwareAddr
|
||||
Flags net.Flags
|
||||
RawFlags uint32
|
||||
ParentIndex int // index of the parent link device
|
||||
MasterIndex int // must be the index of a bridge
|
||||
Namespace interface{} // nil | NsPid | NsFd
|
||||
Alias string
|
||||
AltNames []string
|
||||
Statistics *LinkStatistics
|
||||
Promisc int
|
||||
Allmulti int
|
||||
Multi int
|
||||
Xdp *LinkXdp
|
||||
EncapType string
|
||||
Protinfo *Protinfo
|
||||
OperState LinkOperState
|
||||
PhysSwitchID int
|
||||
NetNsID int
|
||||
NumTxQueues int
|
||||
NumRxQueues int
|
||||
TSOMaxSegs uint32
|
||||
TSOMaxSize uint32
|
||||
GSOMaxSegs uint32
|
||||
GSOMaxSize uint32
|
||||
GROMaxSize uint32
|
||||
GSOIPv4MaxSize uint32
|
||||
GROIPv4MaxSize uint32
|
||||
Vfs []VfInfo // virtual functions available on link
|
||||
Group uint32
|
||||
PermHWAddr net.HardwareAddr
|
||||
Slave LinkSlave
|
||||
}
|
||||
|
||||
// LinkSlave represents a slave device.
|
||||
@ -63,6 +70,7 @@ type VfInfo struct {
|
||||
Mac net.HardwareAddr
|
||||
Vlan int
|
||||
Qos int
|
||||
VlanProto int
|
||||
TxRate int // IFLA_VF_TX_RATE Max TxRate
|
||||
Spoofchk bool
|
||||
LinkState uint32
|
||||
@ -265,6 +273,8 @@ type Bridge struct {
|
||||
AgeingTime *uint32
|
||||
HelloTime *uint32
|
||||
VlanFiltering *bool
|
||||
VlanDefaultPVID *uint16
|
||||
GroupFwdMask *uint16
|
||||
}
|
||||
|
||||
func (bridge *Bridge) Attrs() *LinkAttrs {
|
||||
@ -308,6 +318,9 @@ type Macvlan struct {
|
||||
|
||||
// MACAddrs is only populated for Macvlan SOURCE links
|
||||
MACAddrs []net.HardwareAddr
|
||||
|
||||
BCQueueLen uint32
|
||||
UsedBCQueueLen uint32
|
||||
}
|
||||
|
||||
func (macvlan *Macvlan) Attrs() *LinkAttrs {
|
||||
@ -350,6 +363,46 @@ func (tuntap *Tuntap) Type() string {
|
||||
return "tuntap"
|
||||
}
|
||||
|
||||
type NetkitMode uint32
|
||||
|
||||
const (
|
||||
NETKIT_MODE_L2 NetkitMode = iota
|
||||
NETKIT_MODE_L3
|
||||
)
|
||||
|
||||
type NetkitPolicy int
|
||||
|
||||
const (
|
||||
NETKIT_POLICY_FORWARD NetkitPolicy = 0
|
||||
NETKIT_POLICY_BLACKHOLE NetkitPolicy = 2
|
||||
)
|
||||
|
||||
func (n *Netkit) IsPrimary() bool {
|
||||
return n.isPrimary
|
||||
}
|
||||
|
||||
// SetPeerAttrs will not take effect if trying to modify an existing netkit device
|
||||
func (n *Netkit) SetPeerAttrs(Attrs *LinkAttrs) {
|
||||
n.peerLinkAttrs = *Attrs
|
||||
}
|
||||
|
||||
type Netkit struct {
|
||||
LinkAttrs
|
||||
Mode NetkitMode
|
||||
Policy NetkitPolicy
|
||||
PeerPolicy NetkitPolicy
|
||||
isPrimary bool
|
||||
peerLinkAttrs LinkAttrs
|
||||
}
|
||||
|
||||
func (n *Netkit) Attrs() *LinkAttrs {
|
||||
return &n.LinkAttrs
|
||||
}
|
||||
|
||||
func (n *Netkit) Type() string {
|
||||
return "netkit"
|
||||
}
|
||||
|
||||
// Veth devices must specify PeerName on create
|
||||
type Veth struct {
|
||||
LinkAttrs
|
||||
@ -703,6 +756,7 @@ const (
|
||||
BOND_XMIT_HASH_POLICY_LAYER2_3
|
||||
BOND_XMIT_HASH_POLICY_ENCAP2_3
|
||||
BOND_XMIT_HASH_POLICY_ENCAP3_4
|
||||
BOND_XMIT_HASH_POLICY_VLAN_SRCMAC
|
||||
BOND_XMIT_HASH_POLICY_UNKNOWN
|
||||
)
|
||||
|
||||
@ -712,6 +766,7 @@ var bondXmitHashPolicyToString = map[BondXmitHashPolicy]string{
|
||||
BOND_XMIT_HASH_POLICY_LAYER2_3: "layer2+3",
|
||||
BOND_XMIT_HASH_POLICY_ENCAP2_3: "encap2+3",
|
||||
BOND_XMIT_HASH_POLICY_ENCAP3_4: "encap3+4",
|
||||
BOND_XMIT_HASH_POLICY_VLAN_SRCMAC: "vlan+srcmac",
|
||||
}
|
||||
var StringToBondXmitHashPolicyMap = map[string]BondXmitHashPolicy{
|
||||
"layer2": BOND_XMIT_HASH_POLICY_LAYER2,
|
||||
@ -719,6 +774,7 @@ var StringToBondXmitHashPolicyMap = map[string]BondXmitHashPolicy{
|
||||
"layer2+3": BOND_XMIT_HASH_POLICY_LAYER2_3,
|
||||
"encap2+3": BOND_XMIT_HASH_POLICY_ENCAP2_3,
|
||||
"encap3+4": BOND_XMIT_HASH_POLICY_ENCAP3_4,
|
||||
"vlan+srcmac": BOND_XMIT_HASH_POLICY_VLAN_SRCMAC,
|
||||
}
|
||||
|
||||
// BondLacpRate type
|
||||
@ -974,16 +1030,18 @@ func (v *VrfSlave) SlaveType() string {
|
||||
// https://github.com/torvalds/linux/blob/47ec5303d73ea344e84f46660fff693c57641386/drivers/net/geneve.c#L1209-L1223
|
||||
type Geneve struct {
|
||||
LinkAttrs
|
||||
ID uint32 // vni
|
||||
Remote net.IP
|
||||
Ttl uint8
|
||||
Tos uint8
|
||||
Dport uint16
|
||||
UdpCsum uint8
|
||||
UdpZeroCsum6Tx uint8
|
||||
UdpZeroCsum6Rx uint8
|
||||
Link uint32
|
||||
FlowBased bool
|
||||
ID uint32 // vni
|
||||
Remote net.IP
|
||||
Ttl uint8
|
||||
Tos uint8
|
||||
Dport uint16
|
||||
UdpCsum uint8
|
||||
UdpZeroCsum6Tx uint8
|
||||
UdpZeroCsum6Rx uint8
|
||||
Link uint32
|
||||
FlowBased bool
|
||||
InnerProtoInherit bool
|
||||
Df GeneveDf
|
||||
}
|
||||
|
||||
func (geneve *Geneve) Attrs() *LinkAttrs {
|
||||
@ -994,6 +1052,15 @@ func (geneve *Geneve) Type() string {
|
||||
return "geneve"
|
||||
}
|
||||
|
||||
type GeneveDf uint8
|
||||
|
||||
const (
|
||||
GENEVE_DF_UNSET GeneveDf = iota
|
||||
GENEVE_DF_SET
|
||||
GENEVE_DF_INHERIT
|
||||
GENEVE_DF_MAX
|
||||
)
|
||||
|
||||
// Gretap devices must specify LocalIP and RemoteIP on create
|
||||
type Gretap struct {
|
||||
LinkAttrs
|
||||
@ -1064,6 +1131,7 @@ type Ip6tnl struct {
|
||||
EncapFlags uint16
|
||||
EncapSport uint16
|
||||
EncapDport uint16
|
||||
FlowBased bool
|
||||
}
|
||||
|
||||
func (ip6tnl *Ip6tnl) Attrs() *LinkAttrs {
|
||||
@ -1165,6 +1233,7 @@ type Gretun struct {
|
||||
EncapFlags uint16
|
||||
EncapSport uint16
|
||||
EncapDport uint16
|
||||
FlowBased bool
|
||||
}
|
||||
|
||||
func (gretun *Gretun) Attrs() *LinkAttrs {
|
||||
@ -1208,6 +1277,7 @@ func (gtp *GTP) Type() string {
|
||||
}
|
||||
|
||||
// Virtual XFRM Interfaces
|
||||
//
|
||||
// Named "xfrmi" to prevent confusion with XFRM objects
|
||||
type Xfrmi struct {
|
||||
LinkAttrs
|
||||
|
Reference in New Issue
Block a user