This patch fix routing policy rules not being deleted on termination
due to SIGTERM, SIGHUP, SIGUSR1 or SIGUSR2.
Calling uloop_end makes the call to uloop_run on main to finish and
the process to exit calling the proper cleaning functions.
Signed-off-by: Alejandro Enrique <alejandro.enrique@fon.com>
* When we hit SIGTERM, clean up interfaces directly, so that we
* won't leave our routing in an invalid state.
*/
- cleanup_hosts();
- free_interfaces();
- exit(1);
+ uloop_end();
}
static int usage(const char *progname)