summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-07-23 09:49:24 +0000
committerErmal <eri@pfsense.org>2013-07-23 09:49:24 +0000
commitdbb4e089188f80e0433e3f1f74d58152b23c2fe9 (patch)
treed1cacf9f14286cd74fc2b44665551aaa16f1e625
parent7fa5c18b66be43901e3b815188683c2f097e7b1d (diff)
downloadpfsense-dbb4e089188f80e0433e3f1f74d58152b23c2fe9.zip
pfsense-dbb4e089188f80e0433e3f1f74d58152b23c2fe9.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.inc12
-rwxr-xr-xusr/local/www/interfaces.php12
2 files changed, 20 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index a8e272b..dce51cc 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -4216,11 +4216,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 3805c30..19ed709 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -274,6 +274,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";
@@ -802,6 +803,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']);
@@ -1013,6 +1015,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;
$wancfg['adv_dhcp6_interface_statement_send_options'] = $_POST['adv_dhcp6_interface_statement_send_options'];
$wancfg['adv_dhcp6_interface_statement_request_options'] = $_POST['adv_dhcp6_interface_statement_request_options'];
@@ -2114,6 +2118,13 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
</td>
</tr>
-->
+ <tr style='display:none' name="basicdhcp6_use_pppoeinterface" id="basicdhcp6_use_pppoeinterface">
+ <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 style='display:none' name="basicdhcp6_show_dhcp6_prefix_only" id="basicdhcp6_show_dhcp6_prefix_only">
<td width="22%" valign="top" class="vncell"><?=gettext("Request only a IPv6 prefix"); ?></td>
<td width="78%" class="vtable">
@@ -2291,6 +2302,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
function show_hide_adv_dhcp6(basic, advanced, override) {
+ document.getElementById("basicdhcp6_use_pppoeinterface").style.display = basic;
document.getElementById("basicdhcp6_show_dhcp6_prefix_delegation_size").style.display = basic;
document.getElementById("basicdhcp6_show_dhcp6_prefix_only").style.display = basic;
OpenPOWER on IntegriCloud