diff options
Diffstat (limited to 'server/zclient.go')
-rw-r--r-- | server/zclient.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/zclient.go b/server/zclient.go index 7c311643..12f5357f 100644 --- a/server/zclient.go +++ b/server/zclient.go @@ -501,10 +501,13 @@ func (z *zebraClient) loop() { } } else { for _, path := range msg.PathList { - if len(path.VrfIds) == 0 { - path.VrfIds = []uint16{0} + vrfs := []uint16{0} + if msg.Vrf != nil { + if v, ok := msg.Vrf[path.GetNlri().String()]; ok { + vrfs = append(vrfs, v) + } } - for _, i := range path.VrfIds { + for _, i := range vrfs { if body, isWithdraw := newIPRouteBody(pathList{path}); body != nil { z.client.SendIPRoute(i, body, isWithdraw) } |