summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_gif_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/interfaces_gif_edit.php')
-rw-r--r--usr/local/www/interfaces_gif_edit.php4
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;
}
OpenPOWER on IntegriCloud