summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-05-25 14:36:12 -0400
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-05-30 10:03:10 +0200
commit0b821bb5ee05fd1b1ff552c71d4d1db9fb12213f (patch)
tree92613322cacd8d61fee4de853ffaf0b387009e6e /zebra/rt_netlink.c
parent41e5abf816ddd63dbbd4ce91eacbcd03e2ee2b71 (diff)
tools, zebra: Use different protocol value for our statics
The re-use of RTPROT_STATIC has caused too many collisions where other legitimate route sources are causing us to believe we are the originator of the route. Modify the code so that if another protocol inserts RTPROT_STATIC we will assume it's a Kernel Route. Fixes: #2293 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index a35dc9a177..89f59c1933 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -94,7 +94,7 @@ void rt_netlink_init(void)
static inline int is_selfroute(int proto)
{
if ((proto == RTPROT_BGP) || (proto == RTPROT_OSPF)
- || (proto == RTPROT_STATIC) || (proto == RTPROT_ZEBRA)
+ || (proto == RTPROT_ZSTATIC) || (proto == RTPROT_ZEBRA)
|| (proto == RTPROT_ISIS) || (proto == RTPROT_RIPNG)
|| (proto == RTPROT_NHRP) || (proto == RTPROT_EIGRP)
|| (proto == RTPROT_LDP) || (proto == RTPROT_BABEL)
@@ -120,7 +120,7 @@ static inline int zebra2proto(int proto)
proto = RTPROT_OSPF;
break;
case ZEBRA_ROUTE_STATIC:
- proto = RTPROT_STATIC;
+ proto = RTPROT_ZSTATIC;
break;
case ZEBRA_ROUTE_ISIS:
proto = RTPROT_ISIS;
@@ -194,6 +194,7 @@ static inline int proto2zebra(int proto, int family)
proto = ZEBRA_ROUTE_LDP;
break;
case RTPROT_STATIC:
+ case RTPROT_ZSTATIC:
proto = ZEBRA_ROUTE_STATIC;
break;
case RTPROT_SHARP: