Project

General

Profile

« Previous | Next » 

Revision b7331383

Added by Martin Wasley almost 8 years ago

Add Option to use static IPV6 over v4 parent ( PPPoE

A new option when setting a v6 static on the WAN to allow the connection to use the V4 interfaces i.e. PPPoE

View differences:

src/etc/inc/interfaces.inc
5132 5132
							case 'ppp':
5133 5133
							case 'l2tp':
5134 5134
							case 'pptp':
5135
								if (isset($cfg['dhcp6usev4iface']) && $realv6iface === false) {
5135
								// Added catch for static v6 but using v4 link. Sets things to use pppoe link
5136
								if ((isset($cfg['dhcp6usev4iface']) && $realv6iface === false) || isset($cfg['ipv6usev4iface'])) {
5136 5137
									$wanif = $cfg['if'];
5137 5138
								} else {
5138 5139
									$parents = get_parent_interface($interface);
src/usr/local/www/interfaces.php
313 313
	default:
314 314
		if (is_ipaddrv6($wancfg['ipaddrv6'])) {
315 315
			$pconfig['type6'] = "staticv6";
316
			$pconfig['ipv6usev4iface'] = isset($wancfg['ipv6usev4iface']);
316 317
			$pconfig['ipaddrv6'] = $wancfg['ipaddrv6'];
317 318
			$pconfig['subnetv6'] = $wancfg['subnetv6'];
318 319
			$pconfig['gatewayv6'] = $wancfg['gatewayv6'];
......
1047 1048
		unset($wancfg['dhcp6-ia-pd-send-hint']);
1048 1049
		unset($wancfg['dhcp6prefixonly']);
1049 1050
		unset($wancfg['dhcp6usev4iface']);
1051
		unset($wancfg['ipv6usev4iface']);
1050 1052
		unset($wancfg['dhcp6debug']);
1051 1053
		unset($wancfg['track6-interface']);
1052 1054
		unset($wancfg['track6-prefix-id']);
......
1275 1277
			case "staticv6":
1276 1278
				$wancfg['ipaddrv6'] = $_POST['ipaddrv6'];
1277 1279
				$wancfg['subnetv6'] = $_POST['subnetv6'];
1280
				if ($_POST['ipv6usev4iface'] == "yes") {
1281
					$wancfg['ipv6usev4iface'] = true;
1282
				}
1278 1283
				if ($_POST['gatewayv6'] != "none") {
1279 1284
					$wancfg['gatewayv6'] = $_POST['gatewayv6'];
1280 1285
				}
......
1895 1900
	'V6'
1896 1901
))->addMask('subnetv6', $pconfig['subnetv6'], 128);
1897 1902

  
1903
$section->addInput(new Form_Checkbox(
1904
	'ipv6usev4iface',
1905
	'Use IPv4 connectivity as parent interface',
1906
	'IPV6 will use  the IPv4 connectivity link (PPPoE)',
1907
	$pconfig['ipv6usev4iface']
1908
));
1909

  
1898 1910
$group = new Form_Group('IPv6 Upstream gateway');
1899 1911

  
1900 1912
$group->add(new Form_Select(

Also available in: Unified diff