summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/interfaces.inc2
-rwxr-xr-xusr/local/www/interfaces.php12
2 files changed, 8 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index fb7bb9f..165b17d 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -3218,7 +3218,7 @@ function interface_6rd_configure($interface = "wan", $wancfg) {
/* if the prefix length is not 32 bits we need to shave bits off from the left of the v4 address. */
$rd6brprefixbin .= substr(sprintf("%032b", hexdec($hexbrv4)), $wancfg['prefix-6rd-v4plen'], 32);
/* fill out the rest with 0's */
- $rd6brprefixbin = str_pad($rd6brprefixbin, 128, "0", STR_PAD_RIGHT);;
+ $rd6brprefixbin = str_pad($rd6brprefixbin, 128, "0", STR_PAD_RIGHT);
/* convert the 128 bits for the broker address back into a valid IPv6 address */
$rd6brgw = convert_128bit_to_ipv6($rd6brprefixbin);
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 30fb21f..0189f21 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -521,9 +521,11 @@ if ($_POST['apply']) {
break;
case "6rd":
foreach ($ifdescrs as $ifent => $ifdescr) {
- if ($if != $ifent && (($config[interfaces][$ifent]['ipaddrv6'] == $_POST['type6']) || ($config[interfaces][$ifent]['ipaddrv6'] == "6to4")) ) {
- $input_errors[] = sprintf(gettext("You can only have one interface configured as %s or 6to4."),$_POST['type6']);
- break;
+ if ($if != $ifent && ($config[interfaces][$ifent]['ipaddrv6'] == $_POST['type6'])) {
+ if ($config[interfaces][$ifent]['prefix-6rd'] == $_POST['prefix-6rd']) {
+ $input_errors[] = gettext("You can only have one interface configured in 6rd with same prefix.");
+ break;
+ }
}
}
if (in_array($wancfg['ipaddrv6'], array()))
@@ -531,8 +533,8 @@ if ($_POST['apply']) {
break;
case "6to4":
foreach ($ifdescrs as $ifent => $ifdescr) {
- if ($if != $ifent && (($config[interfaces][$ifent]['ipaddrv6'] == $_POST['type6']) || ($config[interfaces][$ifent]['ipaddrv6'] == "6rd")) ) {
- $input_errors[] = sprintf(gettext("You can only have one interface configured as %s or 6rd."),$_POST['type6']);
+ if ($if != $ifent && ($config[interfaces][$ifent]['ipaddrv6'] == $_POST['type6'])) {
+ $input_errors[] = sprintf(gettext("You can only have one interface configured as 6to4."),$_POST['type6']);
break;
}
}
OpenPOWER on IntegriCloud