mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
openvpn, remove check for mode in remote_network, remote_networkv6
It doesn't seem to make sense to ask for a value and ignore it afterwards, there doesn't appear to be a valid reason to validate here. For https://github.com/opnsense/core/issues/1932
This commit is contained in:
parent
70f5acad06
commit
35dd2ea09c
@ -819,12 +819,11 @@ function openvpn_reconfigure($mode, $settings, $device_only = false)
|
||||
}
|
||||
}
|
||||
|
||||
// Add a remote network route if set, and only for p2p modes.
|
||||
if ((substr($settings['mode'], 0, 3) == "p2p") && (openvpn_validate_cidr($settings['remote_network'], "", true, "ipv4") === false)) {
|
||||
// Add remote network route if set
|
||||
if (openvpn_validate_cidr($settings['remote_network'], "", true, "ipv4") === false) {
|
||||
$conf .= openvpn_gen_routes($settings['remote_network'], "ipv4", false);
|
||||
}
|
||||
// Add a remote network route if set, and only for p2p modes.
|
||||
if ((substr($settings['mode'], 0, 3) == "p2p") && (openvpn_validate_cidr($settings['remote_networkv6'], "", true, "ipv6") === false)) {
|
||||
if (openvpn_validate_cidr($settings['remote_networkv6'], "", true, "ipv6") === false) {
|
||||
$conf .= openvpn_gen_routes($settings['remote_networkv6'], "ipv6", false);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user