]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: use macro for one check 17589/head
authoranlan_cs <anlan_cs@126.com>
Thu, 5 Dec 2024 03:56:34 +0000 (11:56 +0800)
committeranlan_cs <anlan_cs@126.com>
Thu, 5 Dec 2024 13:20:05 +0000 (21:20 +0800)
Signed-off-by: anlan_cs <anlan_cs@126.com>
zebra/zebra_rib.c

index b2543ca0e8b1054b73017854d0c2c57e9a1eae2e..574083ae0283f725319b23fc060769f05980cfcd 100644 (file)
@@ -4406,9 +4406,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
        if (ng) {
                nhe.nhg.nexthop = ng->nexthop;
 
-               if (re->type == ZEBRA_ROUTE_CONNECT ||
-                   re->type == ZEBRA_ROUTE_LOCAL ||
-                   re->type == ZEBRA_ROUTE_KERNEL)
+               if (RIB_SYSTEM_ROUTE(re))
                        SET_FLAG(nhe.flags, NEXTHOP_GROUP_INITIAL_DELAY_INSTALL);
        } else if (re->nhe_id > 0)
                nhe.id = re->nhe_id;