From 9eced774415768ccc0516a9101a632bb07bd530e Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 11 Nov 2011 15:08:42 -0500 Subject: username-as-common-name is not compatible with server-bridge, so don't put it in the config if server-bridge is active. Testing is needed to determine if there is any other negative impact, but with both present, openvpn will not start. --- etc/inc/openvpn.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'etc/inc/openvpn.inc') diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index f94967c..b4de58a 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -452,7 +452,9 @@ function openvpn_reconfigure($mode, $settings) { case 'server_user': $conf .= "client-cert-not-required\n"; case 'server_tls_user': - $conf .= "username-as-common-name\n"; + /* username-as-common-name is not compatible with server-bridge */ + if (stristr($conf, "server-bridge") === false) + $conf .= "username-as-common-name\n"; if (!empty($settings['authmode'])) { $authcfgs = explode(",", $settings['authmode']); $sed = "\$authmodes=array("; -- cgit v1.1