diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-02-24 11:34:03 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-03-06 11:11:54 +0900 |
commit | 59ec403de73d4c83ef28291661941c6334480ebd (patch) | |
tree | 2cc128fdb0c541d9fa2727920799bef5e540c738 /config/bgp_configs.go | |
parent | c06423e60bfb5d8d19a092d89def8f351e421368 (diff) |
config: Config values for Nexthop Tracking with ZClient
For configuring the Nexthop Tracking features with ZClient, this patch
adds the config values:
- "nexthop-trigger-enable" enables to the Nexthop Tracking features.
Please note this features is only available with version 3 or later,
and "true" by the default with that version.
- "nexthop-trigger-delay" specifies the delay sec to update the
nexthops triggered by the events from Zebra daemon. The default is
5 secs and the same with the default of Cisco's routers.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'config/bgp_configs.go')
-rw-r--r-- | config/bgp_configs.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go index 742f80dd..acc9d9f1 100644 --- a/config/bgp_configs.go +++ b/config/bgp_configs.go @@ -1024,6 +1024,10 @@ type ZebraState struct { RedistributeRouteTypeList []InstallProtocolType `mapstructure:"redistribute-route-type-list" json:"redistribute-route-type-list,omitempty"` // original -> gobgp:version Version uint8 `mapstructure:"version" json:"version,omitempty"` + // original -> gobgp:nexthop-trigger-enable + NexthopTriggerEnable bool `mapstructure:"nexthop-trigger-enable" json:"nexthop-trigger-enable,omitempty"` + // original -> gobgp:nexthop-trigger-delay + NexthopTriggerDelay uint8 `mapstructure:"nexthop-trigger-delay" json:"nexthop-trigger-delay,omitempty"` } //struct for container gobgp:config @@ -1037,6 +1041,10 @@ type ZebraConfig struct { RedistributeRouteTypeList []InstallProtocolType `mapstructure:"redistribute-route-type-list" json:"redistribute-route-type-list,omitempty"` // original -> gobgp:version Version uint8 `mapstructure:"version" json:"version,omitempty"` + // original -> gobgp:nexthop-trigger-enable + NexthopTriggerEnable bool `mapstructure:"nexthop-trigger-enable" json:"nexthop-trigger-enable,omitempty"` + // original -> gobgp:nexthop-trigger-delay + NexthopTriggerDelay uint8 `mapstructure:"nexthop-trigger-delay" json:"nexthop-trigger-delay,omitempty"` } func (lhs *ZebraConfig) Equal(rhs *ZebraConfig) bool { @@ -1060,6 +1068,12 @@ func (lhs *ZebraConfig) Equal(rhs *ZebraConfig) bool { if lhs.Version != rhs.Version { return false } + if lhs.NexthopTriggerEnable != rhs.NexthopTriggerEnable { + return false + } + if lhs.NexthopTriggerDelay != rhs.NexthopTriggerDelay { + return false + } return true } |