diff options
author | Ermal <eri@pfsense.org> | 2013-01-24 09:57:22 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-24 09:57:22 +0000 |
commit | 0e22dda58ddc010d12126ed6af6589ff76d03043 (patch) | |
tree | e7396e447b3f7cb6e4582df870f4f022af9c3bf8 /usr/local/www/interfaces_gif_edit.php | |
parent | 7309ff3915c58fd664618f01a91dbe8ac9dd2526 (diff) | |
download | pfsense-0e22dda58ddc010d12126ed6af6589ff76d03043.zip pfsense-0e22dda58ddc010d12126ed6af6589ff76d03043.tar.gz |
Put some more sanity checking for various interface configurations
Diffstat (limited to 'usr/local/www/interfaces_gif_edit.php')
-rw-r--r-- | usr/local/www/interfaces_gif_edit.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/interfaces_gif_edit.php b/usr/local/www/interfaces_gif_edit.php index ea1d3d3..f12f917 100644 --- a/usr/local/www/interfaces_gif_edit.php +++ b/usr/local/www/interfaces_gif_edit.php @@ -80,7 +80,7 @@ if ($_POST) { (!is_ipaddr($_POST['remote-addr']))) { $input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses."); } - + $alias = strstr($_POST['if'],'|'); if ((is_ipaddrv4($alias) && !is_ipaddrv4($_POST['remote-addr'])) || (is_ipaddrv6($alias) && !is_ipaddrv6($_POST['remote-addr']))) @@ -91,7 +91,7 @@ if ($_POST) { continue; /* FIXME: needs to perform proper subnet checks in the feature */ - if (($gif['if'] == strtok($_POST['if'],'|')) && ($gif['tunnel-remote-addr'] == $_POST['tunnel-remote-addr'])) { + if (($gif['if'] == $interface && ($gif['tunnel-remote-addr'] == $_POST['tunnel-remote-addr'])) { $input_errors[] = sprintf(gettext("A gif with the network %s is already defined."), $gif['tunnel-remote-addr']); break; } |