diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-05-12 13:24:27 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-05-22 12:10:07 +0900 |
commit | ea56b24395b29025c0ad4ce2fac10be9b6c8895b (patch) | |
tree | 02b31f2ab29e995db2ee0b206b498a8f85557356 /server/bmp.go | |
parent | 02b4ee0d904945c6cebb0a2d1c894d29c2a292ab (diff) |
bmp: Enable to specify all route monitoring policies
This patch adds the new key "all" for specifying the all BMP route
monitoring policies.
Configuration Example:
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019
route-monitoring-policy = "all"
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'server/bmp.go')
-rw-r--r-- | server/bmp.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/bmp.go b/server/bmp.go index 85016f47..30efaeb1 100644 --- a/server/bmp.go +++ b/server/bmp.go @@ -113,11 +113,13 @@ func (b *bmpClient) loop() { if func() bool { ops := []WatchOption{WatchPeerState(true)} - if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_PRE_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { + if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_PRE_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { ops = append(ops, WatchUpdate(true)) - } else if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_POST_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { + } + if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_POST_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { ops = append(ops, WatchPostUpdate(true)) - } else if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_LOCAL_RIB { + } + if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_LOCAL_RIB || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL { ops = append(ops, WatchBestPath(true)) } w := b.s.Watch(ops...) |