diff --git a/src/etc/rc.routing_configure b/src/etc/rc.routing_configure index 97e223756..96fc57cdf 100755 --- a/src/etc/rc.routing_configure +++ b/src/etc/rc.routing_configure @@ -35,9 +35,10 @@ require_once 'filter.inc'; exit_on_bootup(); +/* when called with an argument we are in gateway switch mode */ $recover_only = !empty($argv[1]); -// drop deleted routes +/* drop deleted routes */ foreach (glob("/tmp/delete_route_*.todo") as $filename) { $network = trim(file_get_contents($filename)); $inet = (is_subnetv6($network) ? "-inet6" : "-inet"); @@ -46,7 +47,6 @@ foreach (glob("/tmp/delete_route_*.todo") as $filename) { } system_routing_configure(true, null, !$recover_only); -filter_configure_sync(true, false); if ($recover_only) { foreach (dpinger_status() as $status) { @@ -56,3 +56,5 @@ if ($recover_only) { } } } + +filter_configure_sync(true, false); diff --git a/src/opnsense/service/conf/actions.d/actions_interface.conf b/src/opnsense/service/conf/actions.d/actions_interface.conf index b132858c4..7c5bd2e54 100644 --- a/src/opnsense/service/conf/actions.d/actions_interface.conf +++ b/src/opnsense/service/conf/actions.d/actions_interface.conf @@ -138,6 +138,7 @@ command:/usr/local/bin/flock -n -E 0 -o /tmp/filter_reload_gateway.lock /usr/loc parameters: type:script message:reconfiguring routing due to gateway alarm +description:Manual gateway switch [route.del] command: /usr/local/opnsense/scripts/routes/del_route.py