From: Christian Franke <[email protected]> si will be NULL after end of the preceeding for loop. update is the right static route info to use for deleting the old route.
Signed-off-by: Christian Franke <[email protected]> --- Also, the reference counting for static routes seems to be broken. It seems to me like: a) static_add_ipv6 will increment the route node reference counter in stable for every call that updates the distance of a route (route_node_get without any unlock node) b) static_delete_ipv6 will increment the same reference counter when a route is deleted (route_node_lookup, but unlock only if nothing to delete) c) Both preceeding issues seem to be present for IPv4 too. I am not yet 100% sure how the static route reference counting is supposed to work. Should the route nodes have a reference if the list of static routes is present? Or one for every route in that list? Is anybody on this list familiar with this part of the code? zebra/zebra_rib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 1650dab..f4df119 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2841,7 +2841,7 @@ static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate, } if (update) - static_delete_ipv6(p, type, gate, ifname, si->distance, vrf_id); + static_delete_ipv6(p, type, gate, ifname, update->distance, vrf_id); /* Make new static route structure. */ si = XCALLOC (MTYPE_STATIC_ROUTE, sizeof (struct static_route)); -- 2.8.0 _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
