mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
System / Routes - delete previous route when changed. closes https://github.com/opnsense/core/issues/4621
This commit is contained in:
parent
533315208c
commit
d24eeea7de
@ -66,6 +66,13 @@ class RoutesController extends ApiMutableModelControllerBase
|
||||
*/
|
||||
public function setrouteAction($uuid)
|
||||
{
|
||||
$node = $this->getBase("route", "route", $uuid);
|
||||
// delete previous route when changed (one shot, apply should only delete the last known situation)
|
||||
if (!empty($node['route']['network']) && $_POST['route']['network'] != $node['route']['network']
|
||||
&& !file_exists("/tmp/delete_route_{$uuid}.todo")
|
||||
) {
|
||||
file_put_contents("/tmp/delete_route_{$uuid}.todo", $node['route']['network']);
|
||||
}
|
||||
return $this->setBase("route", "route", $uuid);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user