summaryrefslogtreecommitdiffstats
path: root/tests/aspath_test.c
diff options
context:
space:
mode:
authorpaul <paul>2006-07-27 21:49:00 +0000
committerpaul <paul>2006-07-27 21:49:00 +0000
commit6ccd3dcd4319ce6028950f0889689fc45eadcc63 (patch)
treef79df536eee13f0dbe546b4702e54ca52974080a /tests/aspath_test.c
parent361e230a2ba8d27d832fab073046a8b1d380d73f (diff)
downloadquagga-6ccd3dcd4319ce6028950f0889689fc45eadcc63.tar.bz2
quagga-6ccd3dcd4319ce6028950f0889689fc45eadcc63.tar.xz
[zebra] Bug #268, Fix race between add/delete of routes, sanitise rib queueing
2006-07-27 Paul Jakma <paul.jakma@sun.com> * rib.h: (struct rib) Add a route_node rn_status flag field, this has to be copied every time head RIB of a route_node changes. Remove the rib lock field, not needed - see below. Add a status field for RIB-private flags. * zebra_rib.c: Add a global for the workqueue hold time, useful for testing. (general) Fix for bug #268. Problem originally detailed by Simon Bryden in [quagga-dev 4001]. Essentially, add/delete of a RIB must happen /before/ the queue. Best-path selection (ie rib_process) and reaping of freed RIBs can then be done after queueing. Only the route_node is queued - no important RIB state (i.e. whether a RIB is to be deleted) is queued. (struct zebra_queue_node_t) Disappears, no longer need to track multiple things on the queue, only the route_node. (rib_{lock,unlock}) removed, RIBs no longer need to be refcounted, no longer queued. (rib_queue_qnode_del) Removed, deleted RIBs no longer deleted via the queue. (rib_queue_add_qnode) deleted (rib_queue_add) Only the route_node is queued for best-path selection, we can check whether it is already queued or not and avoid queueing same node twice - struct rib * argument is not needed. (rib_link/unlink) (un)link RIB from route_node. (rib_{add,del}node) Front-end to updates of a RIB. (rib_process) Reap any deleted RIBs via rib_unlink. Unset the route_node 'QUEUED' flag. (General) Remove calls to rib_queue_add where add/del node was called - not needed, update calls where not. Ignore RIB_ENTRY_REMOVEd ribs in loops through route_nodes
Diffstat (limited to 'tests/aspath_test.c')
0 files changed, 0 insertions, 0 deletions