diff options
author | Hitoshi Irino <irino@sfc.wide.ad.jp> | 2019-03-02 17:49:45 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-03-14 21:20:31 +0900 |
commit | 4967c82a36943d90d1f732bbe4af65b4b39542dc (patch) | |
tree | f6c37c602e684ce1080157b891e528bb1a10de9a | |
parent | 3a79ad3fdcbb7af0b7911a9c610c6e7af970ad6d (diff) |
Fix bug using variable of zclient in AddVrf of server.go.
-rw-r--r-- | internal/pkg/table/table_manager.go | 2 | ||||
-rw-r--r-- | internal/pkg/zebra/zapi.go | 2 | ||||
-rw-r--r-- | pkg/server/server.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/pkg/table/table_manager.go b/internal/pkg/table/table_manager.go index 45698504..9ee57a71 100644 --- a/internal/pkg/table/table_manager.go +++ b/internal/pkg/table/table_manager.go @@ -177,7 +177,7 @@ func (manager *TableManager) releaseMplsLabel(label uint32) { return } } - return + //return } func (manager *TableManager) GetRFlist() []bgp.RouteFamily { diff --git a/internal/pkg/zebra/zapi.go b/internal/pkg/zebra/zapi.go index 9659fa97..351a5f37 100644 --- a/internal/pkg/zebra/zapi.go +++ b/internal/pkg/zebra/zapi.go @@ -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 { diff --git a/pkg/server/server.go b/pkg/server/server.go index 17937fff..71508666 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -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) } } |