summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/openvpn.inc6
-rw-r--r--usr/local/www/vpn_openvpn_client.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index cab5467..6d3062c 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -447,9 +447,9 @@ function openvpn_reconfigure($mode,& $settings) {
// The port we'll listen at
// If local_port is used, bind the management port
- if ($settings['local_port']) {
- $conf .= "lport {$settings['local_port']}\n";
- }
+ $lport = ($settings['local_port']) ? $settings['local_port'] : "0";
+ $conf .= "lport {$lport}\n";
+
// Use unix socket to overcome the problem on any type of server
$conf .= "management {$g['varetc_path']}/openvpn/{$mode_id}.sock unix\n";
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index 04bbeb9..e92d82e 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -479,7 +479,7 @@ if ($savemsg)
<td width="78%" class="vtable">
<input name="local_port" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($pconfig['local_port']);?>"/>
<br/>
- <?=gettext("Set this option if you would like to bind to a specific port"); ?>.
+ <?=gettext("Set this option if you would like to bind to a specific port. Leave this blank or enter 0 for a random dynamic port."); ?>
</td>
</tr>
<tr>
OpenPOWER on IntegriCloud