diff options
author | Ermal <eri@pfsense.org> | 2013-07-23 09:56:38 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-07-23 09:56:38 +0000 |
commit | 329024c8720ecc04c603989575d6eec9cb97bd83 (patch) | |
tree | 1237112b5d4bc714cd7ff44e34ebad14b81b94ea | |
parent | 338ade402396c68dec61762a01bdca5cd298be3c (diff) | |
download | pfsense-329024c8720ecc04c603989575d6eec9cb97bd83.zip pfsense-329024c8720ecc04c603989575d6eec9cb97bd83.tar.gz |
Implement an option to allow using the IPv4 connectivity interface for sending the dhcpv6 information. Usually useful for ppp[oe] type links and some ISP
-rw-r--r-- | etc/inc/interfaces.inc | 12 | ||||
-rwxr-xr-x | usr/local/www/interfaces.php | 11 |
2 files changed, 19 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e8a7a58..7377d9c 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -3916,11 +3916,15 @@ function get_real_interface($interface = "wan", $family = "all") { case 'ppp': case 'l2tp': case 'pptp': - $parents = get_parent_interface($interface); - if (!empty($parents[0])) - $wanif = $parents[0]; - else + if (isset($cfg['dhcp6usev4iface'])) $wanif = $cfg['if']; + else { + $parents = get_parent_interface($interface); + if (!empty($parents[0])) + $wanif = $parents[0]; + else + $wanif = $cfg['if']; + } break; default: if( is_array($cfg['wireless']) || preg_match($g['wireless_regex'], $cfg['if'])) diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index cbb0642..029cc91 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -220,6 +220,7 @@ switch($wancfg['ipaddrv6']) { $pconfig['dhcp6-ia-pd-len'] = $wancfg['dhcp6-ia-pd-len']; $pconfig['type6'] = "dhcp6"; $pconfig['dhcp6prefixonly'] = isset($wancfg['dhcp6prefixonly']); + $pconfig['dhcp6usev4iface'] = isset($wancfg['dhcp6usev4iface']); break; case "6to4": $pconfig['type6'] = "6to4"; @@ -748,6 +749,7 @@ if ($_POST['apply']) { unset($wancfg['dhcp6-duid']); unset($wancfg['dhcp6-ia-pd-len']); unset($wancfg['dhcp6prefixonly']); + unset($wancfg['dhcp6usev4iface']); unset($wancfg['track6-interface']); unset($wancfg['track6-prefix-id']); unset($wancfg['prefix-6rd']); @@ -886,6 +888,8 @@ if ($_POST['apply']) { $wancfg['dhcp6-ia-pd-len'] = $_POST['dhcp6-ia-pd-len']; if($_POST['dhcp6prefixonly'] == "yes") $wancfg['dhcp6prefixonly'] = true; + if($_POST['dhcp6usev4iface'] == "yes") + $wancfg['dhcp6usev4iface'] = true; if($gateway_item) { $a_gateways[] = $gateway_item; } @@ -1801,6 +1805,13 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"), </tr> --> <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Use IPv4 connectivity as parent interface"); ?></td> + <td width="78%" class="vtable"> + <input name="dhcp6usev4iface" type="checkbox" id="dhcp6usev4iface" value="yes" <?php if ($pconfig['dhcp6usev4iface'] == true) echo "checked=\"checked\""; ?> /> + <?=gettext("Request a IPv6 prefix/information through the IPv4 connectivity link"); ?> + </td> + </tr> + <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Request only a IPv6 prefix"); ?></td> <td width="78%" class="vtable"> <input name="dhcp6prefixonly" type="checkbox" id="dhcp6prefixonly" value="yes" <?php if ($pconfig['dhcp6prefixonly'] == true) echo "checked=\"checked\""; ?> /> |