diff options
author | jim-p <jimp@pfsense.org> | 2010-11-19 10:28:08 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-11-19 10:31:56 -0500 |
commit | 5708241f9545924e07c820deecae5455354a6cbc (patch) | |
tree | cd59e68734813fd8c4d95e9015fc42a83b284d44 /etc/inc/openvpn.inc | |
parent | ad88ff3f95b91dd04d2c988a11cce75eacb54358 (diff) | |
download | pfsense-5708241f9545924e07c820deecae5455354a6cbc.zip pfsense-5708241f9545924e07c820deecae5455354a6cbc.tar.gz |
When the local port is left blank on an OpenVPN client, use 'lport 0' to direct the client to use a random source port. Fixes #1025
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r-- | etc/inc/openvpn.inc | 6 |
1 files changed, 3 insertions, 3 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"; |