mirror of https://github.com/vishvananda/netlink
vxlan bug fix: check VtepDevIndex when setting IFLA_VXLAN_LINK
This commit is contained in:
parent
50bae0e9af
commit
dd2d5f17ae
|
@ -180,7 +180,7 @@ type vxlanPortRange struct {
|
|||
func addVxlanAttrs(vxlan* Vxlan, linkInfo *nl.RtAttr) {
|
||||
data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil)
|
||||
nl.NewRtAttrChild(data, nl.IFLA_VXLAN_ID, nl.Uint32Attr(uint32(vxlan.VxlanId)))
|
||||
if vxlan.ParentIndex != 0 {
|
||||
if vxlan.VtepDevIndex != 0 {
|
||||
nl.NewRtAttrChild(data, nl.IFLA_VXLAN_LINK, nl.Uint32Attr(uint32(vxlan.VtepDevIndex)))
|
||||
}
|
||||
if vxlan.SrcAddr != nil {
|
||||
|
|
Loading…
Reference in New Issue