Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
18.1 Legacy Series
»
RADVD Problem on PPPeO link without public IPv6 address
« previous
next »
Print
Pages: [
1
]
Author
Topic: RADVD Problem on PPPeO link without public IPv6 address (Read 5072 times)
Droppie391
Jr. Member
Posts: 55
Karma: 5
RADVD Problem on PPPeO link without public IPv6 address
«
on:
February 14, 2018, 10:15:10 am »
Our ISP does NOT provide ipv6 address but uses Lokal-Link address on the PPPoE link, which results in radvd not starting.
Looking at the generated /var/etc/radvd.conf for the WAN interface shows the problem:
# Automatically Generated, do not edit
# Generated for DHCPv6 Server wan
interface igb0 {
AdvSendAdvert on;
MinRtrAdvInterval 200;
MaxRtrAdvInterval 600;
AdvLinkMTU 1470;
AdvDefaultPreference medium;
prefix / {
DeprecatePrefix on;
AdvOnLink off;
AdvAutonomous off;
AdvRouterAddr on;
};
route ::/0 {
RemoveRoute on;
};
DNSSL my.domain { };
};
In the prefix block, no range nor subnet mask is specified, causing radvd to crash.
Adding a virtual ip address to the wan interface results radvd to crash as well. The generated radvd.conf now
shows 2 prefix blocks, one for the virtual and one for the default, non existing ip address:
# Automatically Generated, do not edit
# Generated for DHCPv6 Server wan
interface igb0 {
AdvSendAdvert on;
MinRtrAdvInterval 200;
MaxRtrAdvInterval 600;
AdvLinkMTU 1470;
AdvDefaultPreference medium;
prefix / {
DeprecatePrefix on;
AdvOnLink off;
AdvAutonomous off;
AdvRouterAddr on;
};
prefix 2001:1234:5678::/48 {
DeprecatePrefix on;
AdvOnLink off;
AdvAutonomous off;
AdvRouterAddr on;
};
route ::/0 {
RemoveRoute on;
};
DNSSL my.domain { };
};
Again, radvd crashes on the missing address and subnet in the first prefix block
Removing the first prefix block and manually starting radvd gets us going.
in /usr/local/etc/inc/service.inc, the following section seems to set these prefix blocks
$stanzas = array();
$ifcfgsnv6 = get_interface_subnetv6($dhcpv6if);
$subnetv6 = gen_subnetv6($ifcfgipv6, $ifcfgsnv6);
$stanzas[] = "{$subnetv6}/{$ifcfgsnv6}";
$viparr = &config_read_array('virtualip', 'vip');
foreach ($viparr as $vip) {
if ($vip['interface'] == $dhcpv6if && is_ipaddrv6($vip['subnet'])) {
$ifcfgsnv6 = $vip['subnet_bits'];
$subnetv6 = gen_subnetv6($vip['subnet'], $ifcfgsnv6);
$stanzas[] = "{$subnetv6}/{$ifcfgsnv6}";
}
}
If $ifcfgsnv6 if checked for an empty value, the config file is generated correctly and radvd runs fine:
$stanzas = array();
$ifcfgsnv6 = get_interface_subnetv6($dhcpv6if);
if ($ifcfgsnv6) {
$subnetv6 = gen_subnetv6($ifcfgipv6, $ifcfgsnv6);
$stanzas[] = "{$subnetv6}/{$ifcfgsnv6}";
}
Resulting radvd.conf:
# Automatically Generated, do not edit
# Generated for DHCPv6 Server wan
interface igb0 {
AdvSendAdvert on;
MinRtrAdvInterval 200;
MaxRtrAdvInterval 600;
AdvLinkMTU 1470;
AdvDefaultPreference medium;
route ::/0 {
RemoveRoute on;
};
DNSSL my.domain { };
};
Please review the code to eliminate this error condition, thanks.
Logged
marjohn56
Hero Member
Posts: 1699
Karma: 179
Re: RADVD Problem on PPPeO link without public IPv6 address
«
Reply #1 on:
February 14, 2018, 05:08:17 pm »
I cannot check this on my system as I have a good ISP who gives me a global on my WAN, in fact I get a /64 on my WAN as well as a /48 on the LAN....
No one else has complained of this, I'll do a patch and review it on Github,
I have created a patch, it's from my fork but I have raised a PR to the master and asked for a review. Try this and see if it does what's needed.
# opnsense-patch af952a2
«
Last Edit: February 15, 2018, 08:58:57 am by marjohn56
»
Logged
OPNsense 24.7
-
Qotom Q355G4
- ISP -
Squirrel 1Gbps
.
Team Rebellion Member
- If we've helped you remember to applaud
Droppie391
Jr. Member
Posts: 55
Karma: 5
Re: RADVD Problem on PPPeO link without public IPv6 address
«
Reply #2 on:
February 15, 2018, 08:33:24 am »
Thanks, works like a charm
Logged
marjohn56
Hero Member
Posts: 1699
Karma: 179
Re: RADVD Problem on PPPeO link without public IPv6 address
«
Reply #3 on:
February 15, 2018, 08:44:34 am »
Just made a minor change to it so the patch ID has changed to ab5f271 for anyone else. It should be pulled soon and will be part of the next release.
Update... merged.
«
Last Edit: February 15, 2018, 08:55:37 am by marjohn56
»
Logged
OPNsense 24.7
-
Qotom Q355G4
- ISP -
Squirrel 1Gbps
.
Team Rebellion Member
- If we've helped you remember to applaud
Droppie391
Jr. Member
Posts: 55
Karma: 5
Re: RADVD Problem on PPPeO link without public IPv6 address
«
Reply #4 on:
February 15, 2018, 09:35:11 am »
patched the changes as well, working fine, thanks
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: RADVD Problem on PPPeO link without public IPv6 address
«
Reply #5 on:
February 15, 2018, 10:01:46 am »
Was merged and will hit 18.1.3 for sure. Thank you for the analysis and patch!
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
18.1 Legacy Series
»
RADVD Problem on PPPeO link without public IPv6 address