diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-01-23 17:00:44 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-02-08 15:33:34 +0900 |
commit | 1fd46103728f0ed421a74a5fd6b96cb74b44bb38 (patch) | |
tree | d57428c3e439cfa63c6f6b60153b40c0913e29d5 /config/bgp_configs.go | |
parent | 5322e63522e9320bc460f5a68538d24d11c5a0ef (diff) |
config: Option to disable best path selection
Note: When this option is specified, no path will be redistributed to
any peer, because there is no best path.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'config/bgp_configs.go')
-rw-r--r-- | config/bgp_configs.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go index 1b219172..402bff40 100644 --- a/config/bgp_configs.go +++ b/config/bgp_configs.go @@ -4517,6 +4517,10 @@ type RouteSelectionOptionsState struct { // BGP best-path. The default is to select the route for // which the metric to the next-hop is lowest. IgnoreNextHopIgpMetric bool `mapstructure:"ignore-next-hop-igp-metric" json:"ignore-next-hop-igp-metric,omitempty"` + // original -> gobgp:disable-best-path-selection + // gobgp:disable-best-path-selection's original type is boolean. + // Disables best path selection process. + DisableBestPathSelection bool `mapstructure:"disable-best-path-selection" json:"disable-best-path-selection,omitempty"` } // struct for container bgp-mp:config. @@ -4558,6 +4562,10 @@ type RouteSelectionOptionsConfig struct { // BGP best-path. The default is to select the route for // which the metric to the next-hop is lowest. IgnoreNextHopIgpMetric bool `mapstructure:"ignore-next-hop-igp-metric" json:"ignore-next-hop-igp-metric,omitempty"` + // original -> gobgp:disable-best-path-selection + // gobgp:disable-best-path-selection's original type is boolean. + // Disables best path selection process. + DisableBestPathSelection bool `mapstructure:"disable-best-path-selection" json:"disable-best-path-selection,omitempty"` } func (lhs *RouteSelectionOptionsConfig) Equal(rhs *RouteSelectionOptionsConfig) bool { @@ -4582,6 +4590,9 @@ func (lhs *RouteSelectionOptionsConfig) Equal(rhs *RouteSelectionOptionsConfig) if lhs.IgnoreNextHopIgpMetric != rhs.IgnoreNextHopIgpMetric { return false } + if lhs.DisableBestPathSelection != rhs.DisableBestPathSelection { + return false + } return true } |