Skip to content

Commit

Permalink
openvpn: revert a change and fix deprecated option
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jan 12, 2018
1 parent 607bec1 commit 0ec330d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/etc/inc/plugins.inc.d/openvpn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ function openvpn_reconfigure($mode, $settings, $device_only = false)
$conf .= "server-ipv6 {$ipv6}/{$prefix}\n";
}
}
break;
/* XXX FALLTHROUGH */
case 'p2p_shared_key':
if (!empty($ip) && !empty($mask)) {
list($ip1, $ip2) = openvpn_get_interface_ip($ip, $mask);
Expand Down Expand Up @@ -668,8 +668,9 @@ function openvpn_reconfigure($mode, $settings, $device_only = false)
// configure user auth modes
switch ($settings['mode']) {
case 'server_user':
/* XXX DEPRECATED, use: verify-client-cert none|optional */
$conf .= "client-cert-not-required\n";
break;
/* FALLTHROUGH */
case 'server_tls_user':
/* username-as-common-name is not compatible with server-bridge */
if (stristr($conf, "server-bridge") === false && empty($settings['use-common-name'])) {
Expand Down Expand Up @@ -740,7 +741,7 @@ function openvpn_reconfigure($mode, $settings, $device_only = false)
switch ($settings['mode']) {
case 'p2p_tls':
$conf .= "tls-client\n";
break;
/* XXX FALLTHROUGH */
case 'shared_key':
$conf .= "client\n";
break;
Expand Down

0 comments on commit 0ec330d

Please sign in to comment.