Skip to content

Commit

Permalink
Fix bug using variable of zclient in AddVrf of server.go.
Browse files Browse the repository at this point in the history
  • Loading branch information
irino committed Mar 2, 2019
1 parent 90eeb5d commit acfd5be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/pkg/table/table_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (manager *TableManager) releaseMplsLabel(label uint32) {
return
}
}
return
//return
}

func (manager *TableManager) GetRFlist() []bgp.RouteFamily {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/zebra/zapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ func (c *Client) SendRedistributeDelete(t ROUTE_TYPE) error {
func (c *Client) SendIPRoute(vrfId uint32, body *IPRouteBody, isWithdraw bool) error {
routeFamily := body.RouteFamily(c.Version)
if vrfId == VRF_DEFAULT && (routeFamily == bgp.RF_IPv4_VPN || routeFamily == bgp.RF_IPv6_VPN) {
return fmt.Errorf("RF_IPv4_VPN or RF_IPv6_VPN are not suitable for VPN_DEFAULT(default forwarding table).")
return fmt.Errorf("RF_IPv4_VPN or RF_IPv6_VPN are not suitable for VPN_DEFAULT(default forwarding table)")
}
command := IPV4_ROUTE_ADD
if c.Version <= 3 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ func (s *BgpServer) AddVrf(ctx context.Context, r *api.AddVrfRequest) error {
s.propagateUpdate(nil, pathList)
}
if vrf, ok := s.globalRib.Vrfs[name]; ok {
if s.zclient.mplsLabelRangeSize > 0 {
if s.bgpConfig.Zebra.Config.MplsLabelRangeSize > 0 {
go assignMplsLabel(s, vrf)
}
}
Expand Down

0 comments on commit acfd5be

Please sign in to comment.