diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index b2712d52f..5bcad6ea9 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -2324,7 +2324,9 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) // TODO: Don't add dupes nhe_connected_add(ifp, nhe); } + SET_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED); + SET_FLAG(nhe->flags, NEXTHOP_GROUP_VALID); } else if (h->nlmsg_type == RTM_DELNEXTHOP) { if (!nhe) { diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 5704cf0e2..1ddfcc745 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -96,9 +96,6 @@ static void *zebra_nhg_alloc(void *arg) id_counter = copy->id; } nhe->id = copy->id; - /* Mark as valid since from the kernel */ - SET_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED); - SET_FLAG(nhe->flags, NEXTHOP_GROUP_VALID); } else { nhe->id = ++id_counter; }