summaryrefslogtreecommitdiffhomepage
path: root/config/bgp_configs.go
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-05-29 15:41:25 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-06-13 13:10:24 +0900
commit4c63ed5d87f28ba2a829cec8cb65c01388a703ed (patch)
treef672f653d93129fccd2147974f55a72fb7f63757 /config/bgp_configs.go
parentf6d62322eb0ba249d67f4b32ad65c7cb5f209544 (diff)
config: Change "RedistributeRouteTypeList" to []string
RedistributeRouteTypeList is []InstallProtocolType, but InstallProtocolType only defines limited number of protocols, And currently, EnableZebra() in gRPC API validates its request with the protocols defined by InstallProtocolType, so the protocols such as "babel" or "lldp" could not be configured to Zebra, via gRPC API. This patch fixes RedistributeRouteTypeList to be []string, and fixes EnableZebra() to validate with the protocols defined in zapi.go. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'config/bgp_configs.go')
-rw-r--r--config/bgp_configs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index 062ef8f7..8268769e 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -1114,7 +1114,7 @@ type ZebraState struct {
// Configure url for zebra.
Url string `mapstructure:"url" json:"url,omitempty"`
// original -> gobgp:redistribute-route-type
- RedistributeRouteTypeList []InstallProtocolType `mapstructure:"redistribute-route-type-list" json:"redistribute-route-type-list,omitempty"`
+ RedistributeRouteTypeList []string `mapstructure:"redistribute-route-type-list" json:"redistribute-route-type-list,omitempty"`
// original -> gobgp:version
// Configure version of zebra protocol. Default is 2. Supported up to 3.
Version uint8 `mapstructure:"version" json:"version,omitempty"`
@@ -1135,7 +1135,7 @@ type ZebraConfig struct {
// Configure url for zebra.
Url string `mapstructure:"url" json:"url,omitempty"`
// original -> gobgp:redistribute-route-type
- RedistributeRouteTypeList []InstallProtocolType `mapstructure:"redistribute-route-type-list" json:"redistribute-route-type-list,omitempty"`
+ RedistributeRouteTypeList []string `mapstructure:"redistribute-route-type-list" json:"redistribute-route-type-list,omitempty"`
// original -> gobgp:version
// Configure version of zebra protocol. Default is 2. Supported up to 3.
Version uint8 `mapstructure:"version" json:"version,omitempty"`