diff options
author | jim-p <jimp@pfsense.org> | 2011-07-22 16:19:36 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-07-22 16:21:29 -0400 |
commit | cec917b53a3921b5ce427045219240b71087103b (patch) | |
tree | 54dce8f34dd6239d56e6bfc798566715c2281a5d /etc/inc/openvpn.inc | |
parent | e5ba916a9b134a813441846dcb64aa690a17553c (diff) | |
download | pfsense-cec917b53a3921b5ce427045219240b71087103b.zip pfsense-cec917b53a3921b5ce427045219240b71087103b.tar.gz |
Only apply remote_network setting for p2p modes, since it is not valid for remote access modes. Fixes #1707
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r-- | etc/inc/openvpn.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index f45dda3..f7f5099 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -516,8 +516,8 @@ function openvpn_reconfigure($mode, $settings) { } } - // Add a remote network route if set - if ($settings['remote_network']) { + // Add a remote network route if set, and only for p2p modes. + if ((substr($settings['mode'], 0, 3) == "p2p") && is_subnet($settings['remote_network'])) { list($ip, $mask) = explode('/', $settings['remote_network']); $mask = gen_subnet_mask($mask); $conf .= "route $ip $mask\n"; |