Revision c987c982
Added by Viktor Gurov over 5 years ago
src/usr/local/www/system_routes.php | ||
---|---|---|
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
function delete_static_route($id) { |
68 |
global $config, $a_routes, $changedesc_prefix; |
|
68 |
global $config, $a_routes, $changedesc_prefix, $a_gateways;
|
|
69 | 69 |
|
70 | 70 |
if (!isset($a_routes[$id])) { |
71 | 71 |
return; |
... | ... | |
90 | 90 |
|
91 | 91 |
foreach ($targets as $tgt) { |
92 | 92 |
$family = (is_subnetv6($tgt) ? "-inet6" : "-inet"); |
93 |
mwexec("/sbin/route delete {$family} " . escapeshellarg($tgt)); |
|
93 |
mwexec("/sbin/route delete {$family} " . escapeshellarg($tgt) . " " . $a_gateways[$a_routes[$id]['gateway']]['gateway']);
|
|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
unset($targets); |
Also available in: Unified diff
full cmd: route delete $fml $tgt $gw
(cherry picked from commit 3e20d17562406d1735720fe6b083e702cfc43de3)