]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: pass type when finding individual nexthop
authorStephen Worley <sworley@cumulusnetworks.com>
Mon, 16 Dec 2019 21:46:30 +0000 (16:46 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Mon, 16 Dec 2019 21:46:30 +0000 (16:46 -0500)
When we are doing a lookup on an individual nexthop,
we should still be passing along the type that gets passed
via the arguments. Otherwise, we will always think we own that
NHE when in reality anyone could have put that into the
kernel.

Before this patch, nexthops in the kernel will get swepped
out even if we didn't create them.

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

index 9065a265ad7d32c85c32cb867d26de42cfac8d68..e920ab812b83934db889d4932608262c31ff1d85 100644 (file)
@@ -593,7 +593,7 @@ zebra_nhg_find_nexthop(uint32_t id, struct nexthop *nh, afi_t afi, int type)
 
        nexthop_group_add_sorted(&nhg, nh);
 
-       zebra_nhg_find(&nhe, id, &nhg, NULL, nh->vrf_id, afi, 0);
+       zebra_nhg_find(&nhe, id, &nhg, NULL, nh->vrf_id, afi, type);
 
        return nhe;
 }