diff options
author | Aman Shaikh <ashaikh@research.att.com> | 2018-01-26 16:17:24 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-01-26 16:17:24 +0900 |
commit | e36879ff7b8d9f42491766951cdff91b7f3812fd (patch) | |
tree | f33d699bba43cb816ffd1732f4503c1141b796ce | |
parent | 3356b9bc9b9c1da723cbaeb63b5496594e9e6e01 (diff) |
server: resolve next-hop with FRR/Zebra for VRF routes
-rw-r--r-- | server/zclient.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/zclient.go b/server/zclient.go index 2e2c0187..93cdac1b 100644 --- a/server/zclient.go +++ b/server/zclient.go @@ -506,7 +506,13 @@ func (z *zebraClient) loop() { } case *WatchEventUpdate: if body, isWithdraw := newNexthopRegisterBody(msg.PathList, z.nhtManager); body != nil { - z.client.SendNexthopRegister(0, body, isWithdraw) + vrfId := uint16(0) + for _, vrf := range z.server.GetVrf() { + if vrf.Name == msg.Neighbor.Config.Vrf { + vrfId = uint16(vrf.Id) + } + } + z.client.SendNexthopRegister(vrfId, body, isWithdraw) } } } |