mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
server: add missing default policy setting in (*BgpServer).Start()
policy.Reset() won't initialize global policy unless we pass a map with key table.GLOBAL_RIB_NAME Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
+1
-2
@@ -1173,8 +1173,7 @@ func (s *BgpServer) Start(c *config.Global) (err error) {
|
||||
|
||||
rfs, _ := config.AfiSafis(c.AfiSafis).ToRfList()
|
||||
s.globalRib = table.NewTableManager(rfs, c.MplsLabelRange.MinLabel, c.MplsLabelRange.MaxLabel)
|
||||
|
||||
if err = s.policy.Reset(&config.RoutingPolicy{}, map[string]config.ApplyPolicy{}); err != nil {
|
||||
if err = s.policy.Reset(&config.RoutingPolicy{}, map[string]config.ApplyPolicy{table.GLOBAL_RIB_NAME: c.ApplyPolicy}); err != nil {
|
||||
return
|
||||
}
|
||||
s.bgpConfig.Global = *c
|
||||
|
||||
Reference in New Issue
Block a user