From 40078ccb05a149405057a02deff3f3c6c1a72cf4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 8 Jun 2017 08:56:36 -0400 Subject: [PATCH] tools, zebra: Allow zebra to insert babel routes as babel Signed-off-by: Donald Sharp --- tools/etc/iproute2/rt_protos.d/frr.conf | 1 + zebra/rt_netlink.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/etc/iproute2/rt_protos.d/frr.conf b/tools/etc/iproute2/rt_protos.d/frr.conf index 3f55b11268..b9824a4f2a 100644 --- a/tools/etc/iproute2/rt_protos.d/frr.conf +++ b/tools/etc/iproute2/rt_protos.d/frr.conf @@ -6,3 +6,4 @@ 189 rip 190 ripng 191 static +194 babel \ No newline at end of file diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index f22f4acb08..4121ed5df8 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -121,7 +121,8 @@ static inline int is_selfroute(int proto) { if ((proto == RTPROT_BGP) || (proto == RTPROT_OSPF) || (proto == RTPROT_STATIC) || (proto == RTPROT_ZEBRA) || - (proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG)) { + (proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG) || + (proto == RTPROT_BABEL)) { return 1; } @@ -131,6 +132,9 @@ static inline int is_selfroute(int proto) static inline int get_rt_proto(int proto) { switch (proto) { + case ZEBRA_ROUTE_BABEL: + proto = RTPROT_BABEL; + break; case ZEBRA_ROUTE_BGP: proto = RTPROT_BGP; break; -- 2.39.5