OpenVPN servers using udp6 or tcp6 fail to start, closes https://github.com/opnsense/core/issues/1576

This commit is contained in:
Ad Schellevis 2017-04-30 11:30:55 +02:00
parent 2b0cb7bed3
commit daa58810fe

View File

@ -543,9 +543,10 @@ function openvpn_reconfigure($mode, $settings, $device_only = false)
if (is_ipaddr($ipaddr)) {
$iface_ip=$ipaddr;
} elseif (!empty($interface) && $interface != "any") {
$iface_ip=get_interface_ip($interface);
if (empty($iface_ip)) {
if (substr($settings['protocol'], 3, 1) == "6") {
$iface_ip = get_interface_ipv6($interface);
} else {
$iface_ip = get_interface_ip($interface);
}
}