From 3145a05a84da7036def7996d76ae9e110cdc1a10 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 18 Dec 2017 11:28:39 +0900 Subject: 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 --- zebra/zapi.go | 45 +++++++++++++++++++++++---------------------- 1 file 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) { -- cgit v1.2.3