]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_rib.c
zebra: clean up zapi organization
[mirror_frr.git] / zebra / zebra_rib.c
index effe672a9ddbf03eb59f52ed0d4ad4ff5de0b663..67832f2d3fe54ba157f6c205ccb6d8dcf00f29cc 100644 (file)
@@ -42,7 +42,6 @@
 #include "zebra/rib.h"
 #include "zebra/rt.h"
 #include "zebra/zebra_ns.h"
-#include "zebra/zserv.h"
 #include "zebra/zebra_vrf.h"
 #include "zebra/redistribute.h"
 #include "zebra/zebra_routemap.h"
@@ -51,6 +50,7 @@
 #include "zebra/interface.h"
 #include "zebra/connected.h"
 #include "zebra/zebra_vxlan.h"
+#include "zebra/zapi_msg.h"
 
 DEFINE_HOOK(rib_update, (struct route_node * rn, const char *reason),
            (rn, reason))
@@ -2121,8 +2121,8 @@ void rib_unlink(struct route_node *rn, struct route_entry *re)
 
        /* free RE and nexthops */
        if (re->type == ZEBRA_ROUTE_STATIC)
-               zebra_deregister_rnh_static_nexthops(re->vrf_id, re->ng.nexthop,
-                                                    rn);
+               zebra_deregister_rnh_static_nexthops(re->ng.nexthop->vrf_id,
+                                                    re->ng.nexthop, rn);
        nexthops_free(re->ng.nexthop);
        XFREE(MTYPE_RE, re);
 }
@@ -2491,8 +2491,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                 * If we can show that this code path is
                 * dead then we can remove it.
                 */
-               if (fib && type == ZEBRA_ROUTE_KERNEL
-                   && CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE)) {
+               if (fib && CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE)) {
                        if (IS_ZEBRA_DEBUG_RIB) {
                                rnode_debug(
                                        rn, vrf_id,