mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
System: Routes: Configuration - add support for rfc5549, missing implementation part for https://github.com/opnsense/core/issues/8157
When specifying different protocols for target network and gateway address, add protocol prefixes to both.
This commit is contained in:
parent
52255d7e46
commit
37a32842fd
@ -751,6 +751,10 @@ 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user