[zebra] Changes of nexthops of static routes didnt take effect

2006-12-08 Piotr Chytla <pch@packetconsulting.pl>

	* zebra_rib.c: (static_install_ipv{4,6}) Case where existing
	  RIB is updated must explicitely rib_addqueue the route_node,
	  to ensure the update actually takes effect.
This commit is contained in:
Paul Jakma 2006-12-08 00:53:14 +00:00
parent 95fdcd8a79
commit 3c0755dc97
2 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2006-12-08 Piotr Chytla <pch@packetconsulting.pl>
* zebra_rib.c: (static_install_ipv{4,6}) Case where existing
RIB is updated must explicitely rib_addqueue the route_node,
to ensure the update actually takes effect.
2006-09-13 Tom Everett <tom@khubla.com> 2006-09-13 Tom Everett <tom@khubla.com>
* kernel_socket.c (rtm_type_str): ifdef RTM_OLD{ADD,DEL} to * kernel_socket.c (rtm_type_str): ifdef RTM_OLD{ADD,DEL} to

View File

@ -1103,20 +1103,20 @@ rib_queue_init (struct zebra_t *zebra)
* The queue length is bounded by the maximal size of the routing table, * The queue length is bounded by the maximal size of the routing table,
* as a route_node will not be requeued, if already queued. * as a route_node will not be requeued, if already queued.
* *
* RIBs are submitted via rib_addnode and rib_delnode, which set * RIBs are submitted via rib_addnode or rib_delnode which set minimal
* minimal state and then submit route_node to queue for best-path * state, or static_install_ipv{4,6} (when an existing RIB is updated)
* selection later. Order of add/delete state changes are preserved for * and then submit route_node to queue for best-path selection later.
* any given RIB. * Order of add/delete state changes are preserved for any given RIB.
* *
* Deleted RIBs are reaped during best-path selection. * Deleted RIBs are reaped during best-path selection.
* *
* rib_addnode * rib_addnode
* |-> rib_link or unset RIB_ENTRY_REMOVE |->Update kernel with * |-> rib_link or unset RIB_ENTRY_REMOVE |->Update kernel with
* |-> rib_addqueue | best RIB, if required * |-------->| | best RIB, if required
* | | * | |
* |-> .......................... -> rib_process * static_install->|->rib_addqueue...... -> rib_process
* | | * | |
* |-> rib_addqueue |-> rib_unlink * |-------->| |-> rib_unlink
* |-> set RIB_ENTRY_REMOVE | * |-> set RIB_ENTRY_REMOVE |
* rib_delnode (RIB freed) * rib_delnode (RIB freed)
* *
@ -1548,6 +1548,7 @@ static_install_ipv4 (struct prefix *p, struct static_ipv4 *si)
nexthop_blackhole_add (rib); nexthop_blackhole_add (rib);
break; break;
} }
rib_queue_add (&zebrad, rn);
} }
else else
{ {
@ -1704,7 +1705,7 @@ static_add_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
} }
} }
/* Distance chaged. */ /* Distance changed. */
if (update) if (update)
static_delete_ipv4 (p, gate, ifname, update->distance, vrf_id); static_delete_ipv4 (p, gate, ifname, update->distance, vrf_id);
@ -2097,6 +2098,7 @@ static_install_ipv6 (struct prefix *p, struct static_ipv6 *si)
nexthop_ipv6_ifname_add (rib, &si->ipv6, si->ifname); nexthop_ipv6_ifname_add (rib, &si->ipv6, si->ifname);
break; break;
} }
rib_queue_add (&zebrad, rn);
} }
else else
{ {