]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Set the INSTALLED flags on nexthop entries we receive
authorStephen Worley <sworley@cumulusnetworks.com>
Fri, 8 Mar 2019 15:23:34 +0000 (10:23 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:37 +0000 (11:13 -0400)
Add SETs to the flags on nexthop entries to mark
 installed/uninstalled from the kernel.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/rt_netlink.c

index bd0ec784860639bda0609d4872302c037f48881c..98138d607b4ce098265ccfd18c2ae15923b5e411 100644 (file)
@@ -2299,6 +2299,8 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                                return -1;
                        }
                }
+               SET_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED);
+
        } else if (h->nlmsg_type == RTM_DELNEXTHOP) {
                if (!nhe) {
                        flog_warn(
@@ -2308,6 +2310,8 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                        return -1;
                }
 
+               UNSET_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED);
+
                // TODO: Run some active check on all route_entry's?
                if (nhe->refcnt) {
                        flog_err(