Bug #16300
openunable to use DHCP6 with if_pppoe, seems seperate issue to the looping bug.
0%
Description
Using a dual stacked ISP who assign a /128 IPv6 to the PPPoE interface, which works as expected on mpd PPPoE.
I also have a virtual IP added, which caused the looping bug, I removed the virtual IP to prevent the loop.
After removing the virtual IP, the IPv6 still failed to be assigned to the PPPoE interface, here is log entries which I think may be relevant, I was also unable to add it manually via ifconfig.
Jul 4 09:07:10 php 8818 /usr/local/sbin/ppp-ipv6: Accept router advertisements on interface pppoe2
Jul 4 09:07:09 php 5494 /usr/local/sbin/ppp-ipv6: Starting rtsold process on wan(pppoe2)
Jul 4 09:07:09 php 5494 /usr/local/sbin/ppp-ipv6: Starting DHCP6 client for interfaces pppoe2
Jul 4 09:07:09 php 5494 /usr/local/sbin/ppp-ipv6: Accept router advertisements on interface pppoe2
Jul 4 09:07:09 kernel 8108 if_pppoe: pppoe2: failed to set default route 17
Jul 4 09:07:09 kernel 8108 pppoe2: link state changed to UP
Jul 4 09:07:09 kernel 8108 if_pppoe: pppoe2: failed to clear IP address: 49
Jul 4 09:07:09 kernel 8108 pppoe2: link state changed to DOWN
Jul 4 09:07:09 kernel 8108 pppoe2: link state changed to UP
At first I thought this was down to the looping bug, as there was also errors regarding pppoe2 not existing so it perhaps tried to add during the loop, but after I remove the IPv4 alias, the IPv6 still fails to get assigned, after moving back to legacy PPPoE the IPv6 works as normal.
If you need me to test again, in a specific way, please let me know and I will do so.
Updated by Chris Collins about 1 month ago
Ok I have now tested this with the patch that fix the loop.
The IPv6 doesnt get assigned, here is latest log entries, without the looping present.
Jul 4 13:46:23 check_reload_status 479 rc.newwanip starting pppoe2
Jul 4 13:46:23 php 23659 /usr/local/sbin/ppp-ipv6: Starting rtsold process on wan(pppoe2)
Jul 4 13:46:23 php 23659 /usr/local/sbin/ppp-ipv6: Accept router advertisements on interface pppoe2
Jul 4 13:46:22 php 19443 /usr/local/sbin/ppp-ipv6: Starting rtsold process on wan(pppoe2)
Jul 4 13:46:22 php 19443 /usr/local/sbin/ppp-ipv6: Starting DHCP6 client for interfaces pppoe2
Jul 4 13:46:22 php 19443 /usr/local/sbin/ppp-ipv6: Accept router advertisements on interface pppoe2
Jul 4 13:46:22 kernel 82 if_pppoe: pppoe2: failed to set default route 17
Jul 4 13:46:22 kernel 82 pppoe2: link state changed to UP
Jul 4 13:46:22 kernel 82 pppoe2: link state changed to DOWN
Jul 4 13:46:22 kernel 82 if_pppoe: pppoe2: failed to clear IP address: 49
Jul 4 13:46:22 kernel 82 pppoe2: link state changed to UP
and (with debug enabled)
Jul 4 13:46:23 dhcp6c 21264 exiting
Jul 4 13:46:23 dhcp6c 21264 script "/var/etc/dhcp6c_wan_script.sh" terminated
Jul 4 13:46:23 dhcp6c 22610 script "/var/etc/dhcp6c_wan_script.sh" cannot be executed safely
Jul 4 13:46:23 dhcp6c 22610 lstat failed: No such file or directory
Jul 4 13:46:23 dhcp6c 21264 executes /var/etc/dhcp6c_wan_script.sh
Jul 4 13:46:23 dhcp6c 21264 removing an event on pppoe2, state=INIT
Jul 4 13:46:23 dhcp6c 21264 exit without release
Jul 4 13:46:22 dhcp6c 21264 reset a timer on pppoe2, state=INIT, timeo=0, retrans=891
Jul 4 13:46:22 dhcp6c 21004 called
Jul 4 13:46:22 dhcp6c 21004 called
Jul 4 13:46:22 dhcp6c 21004 <3>end of sentence [;] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>end of closure [}] (1)
Jul 4 13:46:22 dhcp6c 21004 <13>begin of closure [{] (1)
Jul 4 13:46:22 dhcp6c 21004 <13>[0] (1)
Jul 4 13:46:22 dhcp6c 21004 <13>[na] (2)
Jul 4 13:46:22 dhcp6c 21004 <3>[id-assoc] (8)
Jul 4 13:46:22 dhcp6c 21004 <3>end of sentence [;] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>end of closure [}] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>comment [# we'd like some nameservers please] (35)
Jul 4 13:46:22 dhcp6c 21004 <3>end of sentence [;] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>["/var/etc/dhcp6c_wan_script.sh"] (31)
Jul 4 13:46:22 dhcp6c 21004 <3>[script] (6)
Jul 4 13:46:22 dhcp6c 21004 <3>end of sentence [;] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>[domain-name] (11)
Jul 4 13:46:22 dhcp6c 21004 <3>[request] (7)
Jul 4 13:46:22 dhcp6c 21004 <3>end of sentence [;] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>[domain-name-servers] (19)
Jul 4 13:46:22 dhcp6c 21004 <3>[request] (7)
Jul 4 13:46:22 dhcp6c 21004 <3>comment [# request stateful address] (26)
Jul 4 13:46:22 dhcp6c 21004 <3>end of sentence [;] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>[0] (1)
Jul 4 13:46:22 dhcp6c 21004 <3>[ia-na] (5)
Jul 4 13:46:22 dhcp6c 21004 <3>[send] (4)
Jul 4 13:46:22 dhcp6c 21004 <3>begin of closure [{] (1)
Jul 4 13:46:22 dhcp6c 21004 <5>[pppoe2] (6)
Jul 4 13:46:22 dhcp6c 21004 <3>[interface] (9)
Jul 4 13:46:22 dhcp6c 21004 skip opening control port
Jul 4 13:46:22 dhcp6c 21004 failed initialize control message authentication
Updated by Chris Collins about 1 month ago
contents of /var/etc/dhcp6_wan_script.sh
#!/bin/sh- This shell script launches /etc/rc.newwanipv6 with a interface argument.
dmips=${new_domain_name_servers}
dmnames=${new_domain_name}
case $REASON in
REBIND)
/usr/bin/logger -t dhcp6c "dhcp6c rebind on pppoe2"
;;
REQUEST|RELEASE)
/usr/bin/logger -t dhcp6c "dhcp6c RELEASE, REQUEST or EXIT on pppoe2 running rc.newwanipv6"
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=pppoe2&dmnames=${dmnames}&dmips=${dmips}&reason=${REASON}"
;;
RENEW|INFO)
/usr/bin/logger -t dhcp6c "dhcp6c RENEW on pppoe2 running rc.newwanipv6"
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=pppoe2&dmnames=${dmnames}&dmips=${dmips}&reason=${REASON}"
esac
Updated by Chris Collins 28 days ago
Ok I have a done a little more testing, so the dhcp6c client is not staying in a running state, it is supposed to stay running.
I first tried to just manually start it after pppoe2 is online, but it just says sending solicit every 2 seconds with not much else happening, also the '/var/etc/dhcp6c.conf' is unpopulated.
I then rebooted into legacy mode, and '/var/etc/dhcp6c.conf' is populated with dhcpc6c running as a daemon.
The contents as below.
interface pppoe2 {
send ia-na 0; # request stateful address
request domain-name-servers;
request domain-name;
script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please
};
id-assoc na 0 { };
I then rebooted back into if_pppoe mode, let the ipv4 come online, manually populated the above file to match, and then started dhcpc6c from command line with same syntax as is done automatically and its now working.
SO I think it is a timing problem, needs a delay before it is called, and perhaps a check that if dhcp6c is still not running at end, it fires it up again.
Updated by Chris Collins 28 days ago
I made this patch which seems to make it work automatically now.
--- /etc/inc/interfaces.inc 2025-05-20 15:25:19.000000000 +0100
@ -4028,6 +4028,7
+++ /etc/inc/interfaces.inc 2025-07-07 19:48:09.639482000 +0100@
kill_dhcp6client_process(true);
/* Lock it to avoid multiple runs */
touch("/tmp/dhcp6c_lock");
+ mwexec("/bin/sleep 6");
mwexec("/usr/local/sbin/dhcp6c {$debugOption} " .
"{$noreleaseOption} " .
"-c {$g['varetc_path']}/dhcp6c.conf " .
Updated by Chris Collins 18 days ago
Here is the final patch which so far is working clean, the earlier patch left me with duplicate dhcp6c processes, but this one is only one, with the correct pid matching as well.
--- /etc/inc/interfaces.inc 2025-05-20 15:25:19.000000000 +0100
@ -4024,6 +4024,7 @@
* lock deleted.
+++ /etc/inc/interfaces.inc 2025-07-07 19:48:09.639482000 +0100
*/
+ mwexec("/bin/sleep 3");
if (!file_exists("/tmp/dhcp6c_lock")) {
kill_dhcp6client_process(true);
/* Lock it to avoid multiple runs */@
Updated by Marcos M 18 days ago
Thanks for the troubleshooting. Before a fix is implemented it's best to understand what's happening and how the added delay helps.
Forum discussion on the issue:
https://forum.netgate.com/topic/198027/if_pppoe-problems-with-php-fpm-causing-loops-resolved
Updated by Chris Collins 12 days ago
I am not sure on this Marcos but I believe it might be because my ISP cycles the PPP once after it first gets established, but this doesnt explain why I only need the delay on if_pppoe. I will let you guys know on here, if I notice any issues with the patch, and sadly I only have one ppppoe connection, so cant test on any others.