summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/sources/bmp.md11
-rw-r--r--server/bmp.go9
-rw-r--r--tools/pyang_plugins/gobgp.yang2
3 files changed, 16 insertions, 6 deletions
diff --git a/docs/sources/bmp.md b/docs/sources/bmp.md
index 6d835e85..574a23d9 100644
--- a/docs/sources/bmp.md
+++ b/docs/sources/bmp.md
@@ -25,7 +25,12 @@ Add `[bmp-servers]` session to enable BMP.
port=11019
```
-Flows can be post-policy, pre-policy, or both. Pre-policy flows are the default.
+The supported route monitoring policy types are:
+- pre-policy (Default)
+- post-policy
+- both (Obsoleted)
+- local-rib
+- all
Enable post-policy support as follows:
@@ -37,14 +42,14 @@ Enable post-policy support as follows:
route-monitoring-policy = "post-policy"
```
-Enable both pre-policy and post-policy support as follows:
+Enable all policies support as follows:
```toml
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019
- route-monitoring-policy = "both"
+ route-monitoring-policy = "all"
```
diff --git a/server/bmp.go b/server/bmp.go
index 8d996cd3..df98ab66 100644
--- a/server/bmp.go
+++ b/server/bmp.go
@@ -113,10 +113,15 @@ 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_ALL || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH {
+ if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH {
+ log.WithFields(
+ log.Fields{"Topic": "bmp"},
+ ).Warn("both option for route-monitoring-policy is obsoleted")
+ }
+ if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_PRE_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL {
ops = append(ops, WatchUpdate(true))
}
- 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 {
+ if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_POST_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL {
ops = append(ops, WatchPostUpdate(true))
}
if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_LOCAL_RIB || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL {
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang
index fd1551ea..47f34540 100644
--- a/tools/pyang_plugins/gobgp.yang
+++ b/tools/pyang_plugins/gobgp.yang
@@ -46,7 +46,7 @@ module gobgp {
}
enum BOTH {
value 2;
- description "send both pre and post-policy routes";
+ description "!OBSOLETED! send both pre and post-policy routes";
}
enum LOCAL-RIB {
value 3;