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:20:12 -0400 |
commit | 17c98ba974bd48fd5b43d1ff4fd70ea50cf01b77 (patch) | |
tree | 84ae7bf333ed2b9a12a1f034abf7d639171a8ded /etc/inc/openvpn.inc | |
parent | 53a37558075cff1ebd4acacac16f536239bba072 (diff) | |
download | pfsense-17c98ba974bd48fd5b43d1ff4fd70ea50cf01b77.zip pfsense-17c98ba974bd48fd5b43d1ff4fd70ea50cf01b77.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 0555fca..eb6ed73 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -537,8 +537,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"; |