diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-04-13 19:50:41 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-05-07 21:18:04 +0900 |
commit | 8347c6c94c441e6a2ec4869890a8808208610273 (patch) | |
tree | 1308721425963e629492cddd8767e24e845f09ce /server/zclient.go | |
parent | 6110fad59441454c8a6f534874ae29b770098b73 (diff) |
table: remove VrfIds member in Path structure
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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) } |