server: stop appending 0 in Path.VrfIds

specifying VrfId is not mandatory

Signed-off-by: Wataru Ishida <[email protected]>
This commit is contained in:
Wataru Ishida
2016-10-04 04:15:52 +00:00
parent c2ad9462d6
commit bdcb16900e
+1 -1
View File
@@ -415,7 +415,7 @@ func (server *BgpServer) notifyBestWatcher(best map[string][]*table.Path, multip
switch p.GetRouteFamily() {
case bgp.RF_IPv4_VPN, bgp.RF_IPv6_VPN:
for _, vrf := range server.globalRib.Vrfs {
if table.CanImportToVrf(vrf, p) {
if vrf.Id != 0 && table.CanImportToVrf(vrf, p) {
p.VrfIds = append(p.VrfIds, uint16(vrf.Id))
}
}