这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@vktg
Copy link
Contributor

@vktg vktg commented Dec 14, 2019

need to use full command with GW, i.e.

old way:

# route delete -inet 5.5.5.0/24
route: route has not been found
delete net 5.5.5.0 fib 0: not in table

right way:

# route delete -inet 5.5.5.0/24 10.1.0.254
delete net 5.5.5.0: gateway 10.1.0.254

$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) . " " . $gateway);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$gateway also needs to be wrapped in escapeshellarg().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@netgate-git-updates netgate-git-updates merged commit 6ad0603 into pfsense:master Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants