From 59ec403de73d4c83ef28291661941c6334480ebd Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Fri, 24 Feb 2017 11:34:03 +0900 Subject: 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 --- config/bgp_configs.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'config/bgp_configs.go') 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 } -- cgit v1.2.3