diff options
-rw-r--r-- | src/etc/inc/services.inc | 11 | ||||
-rw-r--r-- | src/etc/inc/system.inc | 6 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index 66f1062..b5adc7f 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -1346,12 +1346,11 @@ EOD; } $ifcfgsnv6 = get_interface_subnetv6($dhcpv6if); $subnetv6 = gen_subnetv6($ifcfgipv6, $ifcfgsnv6); - - if ($ifcfgv6['ipaddrv6'] == 'track6') { - $trackifname = $config['interfaces'][$ifname]['track6-interface']; - $trackcfg = $config['interfaces'][$trackifname]; - $pdlen = 64 - $trackcfg['dhcp6-ia-pd-len']; - } + // We might have some prefix-delegation on WAN (e.g. /48), + // but then it is split and given out to individual interfaces + // (LAN, OPT1, OPT2...) as multiple /64 subnets. So the size + // of each subnet here is always /64. + $pdlen = 64; if ($is_olsr_enabled == true) { if ($dhcpv6ifconf['netmask']) { diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 229add7..b205e1d 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -393,10 +393,8 @@ function system_hosts_generate() { $ipaddrv6 = $host['ipaddrv6']; if ($ipaddrv6 && $host['hostname']) { if ($isdelegated) { - $trackifname = $config['interfaces'][$dhcpif]['track6-interface']; - $trackcfg = $config['interfaces'][$trackifname]; - $pdlen = 64 - $trackcfg['dhcp6-ia-pd-len']; - $ipaddrv6 = merge_ipv6_delegated_prefix(get_interface_ipv6($dhcpif), $ipaddrv6, $pdlen); + // We are always in an "end-user" subnet here, which all are /64 for IPv6. + $ipaddrv6 = merge_ipv6_delegated_prefix(get_interface_ipv6($dhcpif), $ipaddrv6, 64); } if ($host['domain']) { $dhosts .= "{$ipaddrv6} {$host['hostname']}.{$host['domain']}\n"; |