]> git.puffer.fish Git - matthieu/frr.git/commitdiff
*: Rename ZEBRA_FLAG_INTERNAL -> ZEBRA_FLAG_ALLOW_RECURSION
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 27 Feb 2018 02:26:33 +0000 (21:26 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 27 Feb 2018 02:26:33 +0000 (21:26 -0500)
The ZEBRA_FLAG_INTERNAL flag is used to signal to zebra that
the route being added, the nexthops for it can be recursively
resolved.  This name keeps throwing me off when I read it
so let's rename to something that allows the developer to
understand what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_zebra.c
lib/zebra.h
nhrpd/nhrp_route.c
pimd/TODO
zebra/zebra_rib.c

index 1da6136428a3beca98c23b71447d3fa307b638de..daa7ccbf42c70ac40a4acab58928241ddc68db6c 100644 (file)
@@ -1026,14 +1026,14 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
        if (peer->sort == BGP_PEER_IBGP || peer->sort == BGP_PEER_CONFED
            || info->sub_type == BGP_ROUTE_AGGREGATE) {
                SET_FLAG(api.flags, ZEBRA_FLAG_IBGP);
-               SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
+               SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
        }
 
        if ((peer->sort == BGP_PEER_EBGP && peer->ttl != 1)
            || CHECK_FLAG(peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK)
            || bgp_flag_check(bgp, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))
 
-               SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
+               SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
 
        /* Metric is currently based on the best-path only */
        metric = info->attr->med;
@@ -1265,14 +1265,14 @@ void bgp_zebra_withdraw(struct prefix *p, struct bgp_info *info, safi_t safi)
                SET_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE);
 
        if (peer->sort == BGP_PEER_IBGP) {
-               SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
+               SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
                SET_FLAG(api.flags, ZEBRA_FLAG_IBGP);
        }
 
        if ((peer->sort == BGP_PEER_EBGP && peer->ttl != 1)
            || CHECK_FLAG(peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK)
            || bgp_flag_check(peer->bgp, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))
-               SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
+               SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
 
        if (bgp_debug_zebra(p)) {
                char buf[PREFIX_STRLEN];
index b9a795d16099894beac1f9adb4c63cb60d0c87b5..11bf764b630c549ffd6df48517fd50b5d0119028 100644 (file)
@@ -402,7 +402,7 @@ extern const char *zserv_command_string(unsigned int command);
 #define strmatch(a,b) (!strcmp((a), (b)))
 
 /* Zebra message flags */
-#define ZEBRA_FLAG_INTERNAL           0x01
+#define ZEBRA_FLAG_ALLOW_RECURSION    0x01
 #define ZEBRA_FLAG_SELFROUTE          0x02
 #define ZEBRA_FLAG_IBGP               0x08
 #define ZEBRA_FLAG_SELECTED           0x10
index d43aa4929e10c492347789f85d58dd8eaa479453..8178a8b4b5993a3ef8b88fec6d98fbe876de80bc 100644 (file)
@@ -114,7 +114,7 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix
                SET_FLAG(api.flags, ZEBRA_FLAG_FIB_OVERRIDE);
                break;
        }
-       SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
+       SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
 
        SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
        api.nexthop_num = 1;
index 57d2a17b5f6b58183f679012fdfb798df93dd773..b9e415283002b4a784dad7cd09a53e6cbb5ee523 100644 (file)
--- a/pimd/TODO
+++ b/pimd/TODO
@@ -167,9 +167,9 @@ T26 DONE Zebra daemon is marking recursive static route as inactive.
     pointing to kernel routes as inactive:
       zebra/zebra_rib.c nexthop_active_ipv4:
         -- Original:
-         else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
+         else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_ALLOW_RECURSION))
         -- Fixed:
-         else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL) ||
+         else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_ALLOW_RECURSION) ||
                   match->type == ZEBRA_ROUTE_KERNEL)
 
     Old problem description:
index 5c316e077fbd4f924bf03e2b7c5129b256f2f48b..7f6c8aefa8086626d4e40b31fe3b0b49b6801348 100644 (file)
@@ -514,7 +514,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                                        nexthop->ifindex = newhop->ifindex;
                        }
                        return 1;
-               } else if (CHECK_FLAG(re->flags, ZEBRA_FLAG_INTERNAL)) {
+               } else if (CHECK_FLAG(re->flags, ZEBRA_FLAG_ALLOW_RECURSION)) {
                        resolved = 0;
                        for (ALL_NEXTHOPS(match->nexthop, newhop)) {
                                if (!CHECK_FLAG(newhop->flags,