diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-08-07 13:50:55 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-08-08 00:47:05 +0000 |
commit | 7bf91ea437181b85ecc3a1473adc3fbc0da80cbe (patch) | |
tree | 76065f06ca51be79ef47d6d39dfbb9cd39901962 /server | |
parent | 952fbbd5dd3ed8d962bf0dea068bc16e16323e9b (diff) |
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 <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/server.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go index c2386f94..6fa8fe4b 100644 --- a/server/server.go +++ b/server/server.go @@ -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 |