mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
You can have multiple 6rd tunnels now days
This commit is contained in:
parent
2459be5008
commit
dcddb2fa41
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user