这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/usr/local/www/system_routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}

function delete_static_route($id) {
global $config, $a_routes, $changedesc_prefix;
global $config, $a_routes, $changedesc_prefix, $a_gateways;

if (!isset($a_routes[$id])) {
return;
Expand All @@ -92,7 +92,8 @@ function delete_static_route($id) {

foreach ($targets as $tgt) {
$family = (is_subnetv6($tgt) ? "-inet6" : "-inet");
mwexec("/sbin/route delete {$family} " . escapeshellarg($tgt));
$gateway = $a_gateways[$a_routes[$id]['gateway']]['gateway'];
mwexec("/sbin/route delete {$family} " . escapeshellarg($tgt) . " " . escapeshellarg($gateway));
}

unset($targets);
Expand Down