]> git.proxmox.com Git - mirror_frr.git/commit
lib: Fix race condition in shutdown of routemap
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Oct 2016 17:28:35 +0000 (13:28 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Oct 2016 17:40:08 +0000 (13:40 -0400)
commitb09bceec68e9963b0bffc70c04f06d307d474adb
tree527b0b39f4a08fe548913df56f265964ac13897a
parent882261e18b9632092d2e7f226f68e2a1c54a7241
lib: Fix race condition in shutdown of routemap

When shutting down a daemon that uses an update
timer to handle route map processing, there
exists a race condition where if you change
a route map and then immediately shutdown
quagga before the update timer for the routemap
runs, you will be placed in a infinite loop.

This condition happens because this commit introduces
route map memory free'ing but never tests to see
if the to_be_processed flag has happened or not
before deleting:

commit 289d25016b79ed7908a29af7ba35e18f1ec6ed0a
Author: Lou Berger <lberger@labn.net>
Date:   Wed Apr 10 12:30:04 2013 -0700

    bgpd, lib: memory cleanups for valgrind, plus debug changes

Modify route_map_finish to explicitly turn off the to_be_processed
field.  As that we know we are going away if route_map_finish is
called.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
lib/routemap.c