1
0
mirror of https://github.com/vishvananda/netlink synced 2025-03-25 04:26:51 +00:00

Attach RTA_ENCAP_TYPE to children, not rtAttrs, when using Multipath

This commit is contained in:
takt 2019-10-21 17:16:06 +02:00 committed by Vish (Ishaya) Abrams
parent cbc6cb49af
commit d71301a47b

View File

@ -599,7 +599,7 @@ func (h *Handle) routeHandle(route *Route, req *nl.NetlinkRequest, msg *nl.RtMsg
if nh.Encap != nil { if nh.Encap != nil {
buf := make([]byte, 2) buf := make([]byte, 2)
native.PutUint16(buf, uint16(nh.Encap.Type())) native.PutUint16(buf, uint16(nh.Encap.Type()))
rtAttrs = append(rtAttrs, nl.NewRtAttr(unix.RTA_ENCAP_TYPE, buf)) children = append(children, nl.NewRtAttr(unix.RTA_ENCAP_TYPE, buf))
buf, err := nh.Encap.Encode() buf, err := nh.Encap.Encode()
if err != nil { if err != nil {
return err return err