]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: add RTPROT_FABRICD route type 197
authorChristian Franke <chris@opensourcerouting.org>
Mon, 11 Jun 2018 12:09:23 +0000 (14:09 +0200)
committerChristian Franke <chris@opensourcerouting.org>
Wed, 5 Sep 2018 09:38:12 +0000 (11:38 +0200)
Add an iproute2 route type for fabricd

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
tools/etc/iproute2/rt_protos.d/frr.conf
tools/frr
zebra/rt_netlink.c
zebra/rt_netlink.h

index 4c6968ac2765bede04b79465ea70c8d277bfd559..bbb358fc6c5b4176415daf5eac0fdfbe84c3226c 100644 (file)
@@ -11,3 +11,4 @@
 194  sharp
 195  pbr
 196  static
+197  openfabric
index 0b170d33fd62f386728a177aea0946741113abb7..9c8a8e90433f0bed598553ea5b20dc5d97046d61 100755 (executable)
--- a/tools/frr
+++ b/tools/frr
@@ -587,6 +587,7 @@ case "$1" in
           ip route flush proto 194
           ip route flush proto 195
          ip route flush proto 196
+         ip route flush proto 197
        else
          [ -n "$dmn" ] && eval "${dmn/-/_}=0"
          start_watchfrr
index 3683596b41394b9ed3d2a331ad835fafd9a2b98a..8e2cd2e418c303e0bca3a630280363b0f3c0fab7 100644 (file)
@@ -99,7 +99,7 @@ static inline int is_selfroute(int proto)
            || (proto == RTPROT_NHRP) || (proto == RTPROT_EIGRP)
            || (proto == RTPROT_LDP) || (proto == RTPROT_BABEL)
            || (proto == RTPROT_RIP) || (proto == RTPROT_SHARP)
-           || (proto == RTPROT_PBR)) {
+           || (proto == RTPROT_PBR) || (proto == RTPROT_OPENFABRIC)) {
                return 1;
        }
 
@@ -146,6 +146,9 @@ static inline int zebra2proto(int proto)
        case ZEBRA_ROUTE_PBR:
                proto = RTPROT_PBR;
                break;
+       case ZEBRA_ROUTE_OPENFABRIC:
+               proto = RTPROT_OPENFABRIC;
+               break;
        default:
                /*
                 * When a user adds a new protocol this will show up
@@ -203,6 +206,9 @@ static inline int proto2zebra(int proto, int family)
        case RTPROT_PBR:
                proto = ZEBRA_ROUTE_PBR;
                break;
+       case RTPROT_OPENFABRIC:
+               proto = ZEBRA_ROUTE_OPENFABRIC;
+               break;
        default:
                /*
                 * When a user adds a new protocol this will show up
index c4f21d1504ebfc57d09ab9d790d808ed95e9f45c..cefd1996a96ab782fecc8a9e5ddefe7f2015d86e 100644 (file)
@@ -54,6 +54,7 @@
 #define RTPROT_SHARP       194
 #define RTPROT_PBR         195
 #define RTPROT_ZSTATIC     196
+#define RTPROT_OPENFABRIC  197
 
 void rt_netlink_init(void);