mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
system: move argument to where it matters
This commit is contained in:
parent
99b2480dd5
commit
8258239148
@ -751,16 +751,17 @@ function system_routing_configure($verbose = false, $interface_map = null, $moni
|
||||
|
||||
/* XXX some day we might want to convert to safer mwexecf() */
|
||||
$cmd = " -{$ipproto} {$blackhole} " . escapeshellarg($rtent['network']) . " ";
|
||||
if (is_ipaddrv6($gatewayip) && $ipproto == 'inet') {
|
||||
/* rfc5549: gateway protocol differs, so we need to define it as well */
|
||||
$cmd .= ' -inet6 ';
|
||||
}
|
||||
|
||||
if (!empty($rtent['disabled'])) {
|
||||
mwexec("/sbin/route delete {$cmd}", true);
|
||||
} else {
|
||||
if (is_ipaddr($gatewayip)) {
|
||||
mwexec("/sbin/route delete {$cmd}", true);
|
||||
|
||||
if (ipproto == 'inet' && is_ipaddrv6($gatewayip)) {
|
||||
/* RFC 5549: gateway protocol differs */
|
||||
$cmd .= ' -inet6 ';
|
||||
}
|
||||
|
||||
if ($fargw) {
|
||||
mwexecf('/sbin/route delete -%s %s -interface %s ', [$ipproto, $gatewayip, $interfacegw], true);
|
||||
mwexecf('/sbin/route add -%s %s -interface %s', [$ipproto, $gatewayip, $interfacegw]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user