summaryrefslogtreecommitdiffstats
path: root/etc/inc/authgui.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-14 16:25:18 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-02-15 08:12:16 -0200
commit71034b51ff8831b43cf70c6f26955e6e6bdee5ca (patch)
tree05f6a2c4ad59cc78bcc112cda6a71396c369541e /etc/inc/authgui.inc
parent40c7b1a98bfdc61261154adaac5fdefc234ecb08 (diff)
downloadpfsense-71034b51ff8831b43cf70c6f26955e6e6bdee5ca.zip
pfsense-71034b51ff8831b43cf70c6f26955e6e6bdee5ca.tar.gz
Treat openvpn tunnel IPs as local IPs and prevent warning on login page when acessing it using tun IP address. Fixes #1681
Diffstat (limited to 'etc/inc/authgui.inc')
-rw-r--r--etc/inc/authgui.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index cec9c81..57d0138 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -203,6 +203,19 @@ if($config['virtualip']) {
}
}
}
+if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as $ovpns) {
+ if (is_ipaddrv4($http_host) && !empty($ovpns['tunnel_network']) && ip_in_subnet($http_host, $ovpns['tunnel_network'])) {
+ $local_ip = true;
+ break;
+ }
+
+ if (is_ipaddrv6($http_host) && !empty($ovpns['tunnel_networkv6']) && ip_in_subnet($http_host, $ovpns['tunnel_networkv6'])) {
+ $local_ip = true;
+ break;
+ }
+ }
+}
setcookie("cookie_test", time() + 3600);
$have_cookies = isset($_COOKIE["cookie_test"]);
OpenPOWER on IntegriCloud