]> git.proxmox.com Git - mirror_frr.git/commitdiff
tools, zebra: Fix netlink notification of who owns the routes
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 8 Jun 2017 12:48:10 +0000 (08:48 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 8 Jun 2017 12:51:25 +0000 (08:51 -0400)
For NHRP, EIGRP and LDP( This is for consistency as opposed to correctness )
assign some new values to routes to be installed into the kernel
so we can know who owns them later.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
tools/etc/iproute2/rt_protos.d/frr.conf
zebra/rt_netlink.c
zebra/rt_netlink.h

index 3f55b11268c16b24c42d59c4058c8090958f1256..2d3b884e7e7ef2f90bd65b5392a56fe99c280161 100644 (file)
@@ -5,4 +5,6 @@
 188  ospf
 189  rip
 190  ripng
-191  static
+191  nhrp
+192  eigrp
+193  ldp
index 88cdfbcae125310d9ae22a5817d91bb71bfaffb0..9bad7991a5418187b136dd9d29d59ca170b72722 100644 (file)
@@ -121,7 +121,9 @@ 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_NHRP) || (proto == RTPROT_EIGRP) ||
+      (proto == RTPROT_LDP)) {
     return 1;
   }
 
@@ -150,6 +152,15 @@ static inline int get_rt_proto(int proto)
   case ZEBRA_ROUTE_RIPNG:
     proto = RTPROT_RIPNG;
     break;
+  case ZEBRA_ROUTE_NHRP:
+    proto = RTPROT_NHRP;
+    break;
+  case ZEBRA_ROUTE_EIGRP:
+    proto = RTPROT_EIGRP;
+    break;
+  case ZEBRA_ROUTE_LDP:
+    proto = RTPROT_LDP;
+    break;
   default:
     proto = RTPROT_ZEBRA;
     break;
index 4ec5f18535cb15a12fe561753324cc00b0c43af3..6f9487542ca21ca38e01a9cd1103bde780adef45 100644 (file)
@@ -33,6 +33,9 @@
 #define RTPROT_OSPF        188
 #define RTPROT_RIP         189
 #define RTPROT_RIPNG       190
+#define RTPROT_NHRP        191
+#define RTPROT_EIGRP       192
+#define RTPROT_LDP         193
 
 void rt_netlink_init (void);