summaryrefslogtreecommitdiffhomepage
path: root/zebra/zapi.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-12-18 11:28:39 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-12-21 08:26:06 +0900
commit3145a05a84da7036def7996d76ae9e110cdc1a10 (patch)
tree5d886675b826e5841d7d135d308f4b56698439b0 /zebra/zapi.go
parentb8863e58144a0ea1685b7ef39903bb621bc5310a (diff)
zebra: fix 'directly-connected' type configuration from grpc api
Works but sorta hacky. We should revise after the GRPC API udpate. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'zebra/zapi.go')
-rw-r--r--zebra/zapi.go45
1 files changed, 23 insertions, 22 deletions
diff --git a/zebra/zapi.go b/zebra/zapi.go
index ef6b79d7..e4de6253 100644
--- a/zebra/zapi.go
+++ b/zebra/zapi.go
@@ -328,28 +328,29 @@ const (
)
var routeTypeValueMap = map[string]ROUTE_TYPE{
- "system": ROUTE_SYSTEM,
- "kernel": ROUTE_KERNEL,
- "connect": ROUTE_CONNECT,
- "static": ROUTE_STATIC,
- "rip": ROUTE_RIP,
- "ripng": ROUTE_RIPNG,
- "ospf": ROUTE_OSPF,
- "ospf3": ROUTE_OSPF6,
- "isis": ROUTE_ISIS,
- "bgp": ROUTE_BGP,
- "pim": ROUTE_PIM,
- "hsls": ROUTE_HSLS,
- "olsr": ROUTE_OLSR,
- "babel": ROUTE_BABEL,
- "table": FRR_ROUTE_TABLE,
- "ldp": FRR_ROUTE_LDP,
- "vnc": FRR_ROUTE_VNC,
- "vnc-direct": FRR_ROUTE_VNC_DIRECT,
- "vnc-direct-rh": FRR_ROUTE_VNC_DIRECT_RH,
- "bgp-direct": FRR_ROUTE_BGP_DIRECT,
- "bgp-direct-ext": FRR_ROUTE_BGP_DIRECT_EXT,
- "all": FRR_ROUTE_ALL,
+ "system": ROUTE_SYSTEM,
+ "kernel": ROUTE_KERNEL,
+ "connect": ROUTE_CONNECT, // hack for backyard compatibility
+ "directly-connected": ROUTE_CONNECT,
+ "static": ROUTE_STATIC,
+ "rip": ROUTE_RIP,
+ "ripng": ROUTE_RIPNG,
+ "ospf": ROUTE_OSPF,
+ "ospf3": ROUTE_OSPF6,
+ "isis": ROUTE_ISIS,
+ "bgp": ROUTE_BGP,
+ "pim": ROUTE_PIM,
+ "hsls": ROUTE_HSLS,
+ "olsr": ROUTE_OLSR,
+ "babel": ROUTE_BABEL,
+ "table": FRR_ROUTE_TABLE,
+ "ldp": FRR_ROUTE_LDP,
+ "vnc": FRR_ROUTE_VNC,
+ "vnc-direct": FRR_ROUTE_VNC_DIRECT,
+ "vnc-direct-rh": FRR_ROUTE_VNC_DIRECT_RH,
+ "bgp-direct": FRR_ROUTE_BGP_DIRECT,
+ "bgp-direct-ext": FRR_ROUTE_BGP_DIRECT_EXT,
+ "all": FRR_ROUTE_ALL,
}
func RouteTypeFromString(typ string) (ROUTE_TYPE, error) {