You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dhcpcd (even with the latest #555 patch) not works on FreeBSD 15-RELEASE. It fails with the following errors.
The most worrying thing is that older versions (10.2.4) do not work either on 15R.
P.S. I'm seriously considering whether it's time to build dhcpcd binary with --disable-privsep, as it seems to cause more problems than it solves, at least on FreeBSD...
And I still can't replicate it on a FreeBSD-15 vm :(
@rsmarples I believe it's due to different setups.
I use mpd5 as a pppoe client that creates the Netgraph interface ng0 on which dhcpcd runs.
In seven similar setups that I use in production, dhcpcd exhibits exactly the same issue.
Even 10.2.4 that used to work flawlessly with FreeBSD 14.3 and earlier, exhibits now similar malfunctions on 15-Release under the same operating conditions. Perhaps something has changed in R15.
As I mentioned, I had to build dhcpcd with --disable-privsep in order to continue uninterrupted operation with R15.
This way everything works smoothly as always, and I'm seriously considering continuing to run it like this on production, at least until the issue is permanently fixed.
P.S. I will test your changes and keep you informed of the findings.
@athanp I've pushed another change to the branch, could you test it please?
I understand you have to disable privsep for production right now, but privsep (or more specifically capsicum) was a requirement for dhcpcd to be included in FreeBSD-base .... but that seems to have stalled again.
This issue exists even with that patch applied, even with previous dhcpcd versions e.g 10.2.x
I had to compile it with --disable-privsep to be able to continue using it.
@athanp if you have the time and want to help provide some test debug, could you compile with CPPFLAGS+=-DPRIVSEP_DEBUG and post some logs.
It will be very very verbose. You could also email them to me at [email protected] if you prefer not to post here.
logfile /var/log/dhcpcd/dhcpcd.log
noipv6rs
nohook resolv.conf, hostname, ntp.conf, test
duid
require dhcp_server_identifier
slaac private
option interface_mtu
denyinterfaces backplane data guests iot iptv ixl0 ixl1 lan lo0 pfsync0 sync # Don't touch other interfaces at all
interface voip
noipv6
nodhcp6
nogateway
interface internet
noipv4
ipv6only
ipv6rs # enable routing solicitation for internet
ia_na 1 # request a NA network address
ia_pd 1 lan/0/64/0 guests/1/64/0 iot/2/64/0 backplane/3/64/0 # request a PD /64 prefix delegation and assign it to
I'm using FreeBSD 15.0-RELEASE (GENERIC) releng/15.0-n280995-7aedc8de6446 and I just cannot replicate this.
I have this running on a QEMU VM on my NetBSD host and I've created a lot of tap devices and renamed them to match the above and use the same config and it just works for me.
Is it possible for anyone to downgrade to FreeBSD-14 to see if the issue is there still so we can work out if it's only FreeBSD-15 affected?
while the interface called internet is created using mpd5 (it uses netgraph, if this is relevant) as pppoe client to authenticate with my ISP.
Here's the relevant configuration for the network interface used by mpd:
[ale@freebsd15 ~]$ ifconfig data
data: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
options=4400000<TXCSUM_IPV6,MEXTPG>
ether 64:9d:99:b2:8a:a6
groups: vlan
vlan: 6 vlanproto: 802.1q vlanpcp: 1 parent interface: lan
media: Ethernet autoselect
status: active
nd6 options=1<PERFORMNUD>
and here is my mpd.conf file:
isp:
create bundle static B1
set bundle enable ipv6cp
set bundle enable ipcp
set iface name internet
set iface enable tcpmssfix
set iface route default
set iface up-script /usr/local/etc/mpd5/up.sh
#set iface down-script /usr/local/etc/mpd5/down.sh
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
create link static L1 pppoe
set link action bundle B1
set auth authname redact3d
set auth password r3dacted
set link max-redial 0
set link mtu 1492
set link mru 1492
set link keep-alive 10 60
set pppoe iface data
set pppoe service ""
open
default:
load isp
I know we can compile the software with --disable-privsep option, but it does not seem a solution to me :)
Let me know if you need anything else, thank you
Hmmm, both of you use pppoe via mpd5. Is that the common cause? I'll see if I can setup a PPPoE server and mirror the config.
Likely take some time as I really hate debugging PPPoE and I'm not good at setting this up.
exactly, this is what I see in my dhcpcd.log file if only the voip interface is available on the 15.0 system:
Dec 28 13:37:46 [87128]: dhcpcd-10.3.0 starting
Dec 28 13:37:46 [87688]: DUID 00:01:00:01:30:e1:7b:63:64:9d:99:b2:8a:a6
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 32, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 28, expecting 24
Dec 28 13:37:46 [87688]: SIOCSRTRFLUSH_IN6 89: Bad message
Dec 28 13:37:46 [87688]: script_runreason: Inappropriate ioctl for device
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 24, expecting 634
Dec 28 13:37:46 [87688]: script_runreason: Bad message
Dec 28 13:37:46 [87688]: voip: IAID 99:b2:8a:a6
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 610, expecting 3414963751808951367
Dec 28 13:37:46 [87688]: ipv6_readsecret: cannot read secret: Bad message
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 24, expecting 32
Dec 28 13:37:46 [87688]: ipv6_readsecret: cannot write secret: Bad message
Dec 28 13:37:46 [87688]: voip: ipv6_start: Bad message
Dec 28 13:37:46 [87688]: voip: /var/db/dhcpcd/voip.lease: Invalid argument
Dec 28 13:37:46 [87688]: voip: soliciting a DHCP lease
Dec 28 13:37:47 [87688]: voip: offered 10.25.14.88 from 172.24.244.52
Dec 28 13:37:47 [87688]: voip: leased 10.25.14.88 for 43345 seconds
Dec 28 13:37:47 [87688]: ps_root_readerrorcb: recvmsg returned 24, expecting 312
Dec 28 13:37:47 [87688]: dhcp_writefile: /var/db/dhcpcd/voip.lease: Bad message
Dec 28 13:37:47 [87688]: ps_root_readerrorcb: recvmsg returned 288, expecting 24
Dec 28 13:37:47 [87688]: rt_build: if_initrt: Bad message
Dec 28 13:37:47 [87688]: voip: adding route to 10.25.0.0/18
Dec 28 13:37:47 [87688]: if_route (ADD): Device not configured
Dec 28 13:37:47 [87688]: voip: adding default route via 10.25.0.1
Dec 28 13:38:20 [87688]: voip: pid 0 deleted default route via 10.25.0.1
so that possibly means things are working as expected, if I read it right?
@asagratini ah, @athanp said that 10.2.4 was working fine on FreeBSD-14, can you be more specific please? Have to you tested 10.3.0 and/or the privsep-recvmsg branch we are testing here?
right, all the information I shared is when using 10.3.0 version with the privsep-recvmsg branch, apologies if I did not mention this earlier in the thread
exactly, this is what I see in my dhcpcd.log file if only the voip interface is available on the 15.0 system:
Dec 28 13:37:46 [87128]: dhcpcd-10.3.0 starting
Dec 28 13:37:46 [87688]: DUID 00:01:00:01:30:e1:7b:63:64:9d:99:b2:8a:a6
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 32, expecting 60
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 28, expecting 24
Dec 28 13:37:46 [87688]: SIOCSRTRFLUSH_IN6 89: Bad message
Dec 28 13:37:46 [87688]: script_runreason: Inappropriate ioctl for device
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 24, expecting 634
Dec 28 13:37:46 [87688]: script_runreason: Bad message
Dec 28 13:37:46 [87688]: voip: IAID 99:b2:8a:a6
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 610, expecting 3414963751808951367
Dec 28 13:37:46 [87688]: ipv6_readsecret: cannot read secret: Bad message
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 24, expecting 32
Dec 28 13:37:46 [87688]: ipv6_readsecret: cannot write secret: Bad message
Dec 28 13:37:46 [87688]: voip: ipv6_start: Bad message
Dec 28 13:37:46 [87688]: voip: /var/db/dhcpcd/voip.lease: Invalid argument
Dec 28 13:37:46 [87688]: voip: soliciting a DHCP lease
Dec 28 13:37:47 [87688]: voip: offered 10.25.14.88 from 172.24.244.52
Dec 28 13:37:47 [87688]: voip: leased 10.25.14.88 for 43345 seconds
Dec 28 13:37:47 [87688]: ps_root_readerrorcb: recvmsg returned 24, expecting 312
Dec 28 13:37:47 [87688]: dhcp_writefile: /var/db/dhcpcd/voip.lease: Bad message
Dec 28 13:37:47 [87688]: ps_root_readerrorcb: recvmsg returned 288, expecting 24
Dec 28 13:37:47 [87688]: rt_build: if_initrt: Bad message
Dec 28 13:37:47 [87688]: voip: adding route to 10.25.0.0/18
Dec 28 13:37:47 [87688]: if_route (ADD): Device not configured
Dec 28 13:37:47 [87688]: voip: adding default route via 10.25.0.1
Dec 28 13:38:20 [87688]: voip: pid 0 deleted default route via 10.25.0.1
so that possibly means things are working as expected, if I read it right?
No, things are not working that is just co-incidence. Example errors below:
Dec 28 13:37:46 [87688]: ps_root_readerrorcb: recvmsg returned 44, expecting 60
Dec 28 13:37:46 [87688]: SIOCSRTRFLUSH_IN6 89: Bad message
Dec 28 13:37:46 [87688]: voip: /var/db/dhcpcd/voip.lease: Invalid argument
I'm sorry I couldn't help with debug info and the rest, but I'm away from my lab on a Christmas vacation trip.
What is certain is that with a direct ethernet connection (no PPPoE) it works without problems, while with PPPoE it does not.
In the latter case, it was necessary to build it with --disable-privsep, which works without any problems with the mpd5 pppoe client and the ng0 created interface.
In my setup where it also fails, I also have VLAN's on top of a lagg. But I'm not using any pppoe.
This can't possibly be related?
mmh, @driesmp, if you check this message, you will notice my interfaces are using VLAN, though I understand pope and VLANs might be 2 separate issues here
But if @driesmp is saying that this happens without PPPoE then I'm getting really confused as to what the trigger for this issue is as I really can't replicate it anymore at my end on the master branch.
exactly, I am also seeing these errors on one of non-PPPOE interfaces, on FreeBSD 15.0 with privileges separation enabled:
Feb 17 13:16:22 [92804]: dhcpcd-10.3.0 starting
Feb 17 13:16:22 [93626]: DUID 00:01:00:01:30:eb:7f:cb:64:9d:99:b2:8a:a6
Feb 17 13:16:22 [93626]: SIOCSRTRFLUSH_IN6 89: Bad message
Feb 17 13:16:22 [93626]: script_runreason: Inappropriate ioctl for device
Feb 17 13:16:22 [93626]: voip: IAID 99:b2:8a:a6
Feb 17 13:16:22 [93626]: ipv6_readsecret: cannot read secret: Invalid argument
Feb 17 13:16:22 [93626]: ipv6_readsecret: cannot write secret: Bad message
Feb 17 13:16:22 [93626]: voip: ipv6_start: Bad message
Feb 17 13:16:23 [93626]: voip: /var/db/dhcpcd/voip.lease: Invalid argument
Feb 17 13:16:23 [93626]: voip: soliciting a DHCP lease
Feb 17 13:16:23 [80561]: ps_bpf_recvmsg: No buffer space available
Feb 17 13:16:27 [80561]: ps_bpf_recvmsg: No buffer space available
Feb 17 13:16:28 [93626]: voip: probing for an IPv4LL address
Feb 17 13:16:33 [93626]: voip: using IPv4LL address 169.254.47.101
Feb 17 13:16:33 [93626]: ipv4_addaddr: if_addaddress: Bad message
Feb 17 13:16:34 [93626]: voip: offered 10.25.16.4 from 172.24.244.52
Feb 17 13:16:34 [93626]: voip: probing address 10.25.16.4/18
Feb 17 13:16:40 [93626]: voip: leased 10.25.16.4 for 43345 seconds
Feb 17 13:16:40 [93626]: ipv4_addaddr: if_addaddress: Bad message
Feb 17 13:16:40 [93626]: voip: ipv4_deladdr: Bad message
Feb 17 13:16:40 [93626]: rt_build: if_initrt: Invalid argument
Feb 17 13:16:40 [93626]: script_runreason: Device not configured
Feb 17 13:16:52 [93626]: timed out
here's the interface
[ale@mattaneo ~]$ ifconfig voip
voip: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
options=4400000<TXCSUM_IPV6,MEXTPG>
ether 64:9d:99:b2:8a:a6
inet 10.25.16.4 netmask 0xffffc000 broadcast 10.25.63.255
groups: vlan
vlan: 3 vlanproto: 802.1q vlanpcp: 4 parent interface: lan
media: Ethernet autoselect
status: active
nd6 options=1<PERFORMNUD>
As @driesmp mentioned, it is a VLAN on top of a LAGG one
As you can see, I am running VLANs on top of a LAGG and using Jumbo Frames, too; let me know if you need anything else, thank you
If it matters, this is my dhcpcd.conf:
logfile /var/log/dhcpcd/dhcpcd.log
noipv6rs
nohook resolv.conf, hostname, ntp.conf, test
duid
require dhcp_server_identifier
slaac private
option interface_mtu
denyinterfaces backplane data guests iot iptv ixl0 ixl1 lan lo0 pfsync0 sync # Don't touch these interfaces at all
interface voip
noipv6
nodhcp6
nogateway
interface internet
noipv4
ipv6only
ia_na 1 # request a NA network address
ia_pd 1 lan/0/64/0 guests/1/64/0 iot/2/64/0 backplane/3/64/0 # request a PD /64 prefix delegation and assign it to lan, guests, iot and backplane
@rsmarples I noticed this commit from a couple of days ago.
I compiled the code from source passing ./configure --enable-privsep --prefix=/usr/local/ --datadir=/usr/local/share/examples/ --privsepuser="_dhcp" --without-udev parameters during the configure option and now all the errors have disappeared for my use case.
I would let the program run for some more time to see what happens, but I can see that issues are being resolved by that commit
@rsmarples YES, I confirm that the master branch fixed this issue!
Tested on FreeBSD 15 and 14.4 using direct ethernet as well as PPPoE wan interfaces. No core dump neither any suspicious log messages.
Great job with the bug hunting; It was a tough nut to crack!
Just upgraded FreeBSD to 15.0 today and run into non-working dhcpcd. It wasn't crashing in my case but rather was throwing weird "Invalid argument" errors. Rebuilding with commit 5272125 fixed my problems.
Activity
rsmarples commentedon Nov 30, 2025
@athanp I've pushed a new change to the branch which adds some diagnosis for when this goes wrong.
And I still can't replicate it on a FreeBSD-15 vm :(
athanp commentedon Nov 30, 2025
@rsmarples I believe it's due to different setups.
I use mpd5 as a pppoe client that creates the Netgraph interface ng0 on which dhcpcd runs.
In seven similar setups that I use in production, dhcpcd exhibits exactly the same issue.
Even 10.2.4 that used to work flawlessly with FreeBSD 14.3 and earlier, exhibits now similar malfunctions on 15-Release under the same operating conditions. Perhaps something has changed in R15.
As I mentioned, I had to build dhcpcd with --disable-privsep in order to continue uninterrupted operation with R15.
This way everything works smoothly as always, and I'm seriously considering continuing to run it like this on production, at least until the issue is permanently fixed.
P.S. I will test your changes and keep you informed of the findings.
rsmarples commentedon Dec 3, 2025
@athanp I've pushed another change to the branch, could you test it please?
I understand you have to disable privsep for production right now, but privsep (or more specifically capsicum) was a requirement for dhcpcd to be included in FreeBSD-base .... but that seems to have stalled again.
perkelix commentedon Dec 3, 2025
@athanp What about the patch proposed here?
athanp commentedon Dec 4, 2025
This issue exists even with that patch applied, even with previous dhcpcd versions e.g 10.2.x
I had to compile it with --disable-privsep to be able to continue using it.
rsmarples commentedon Dec 4, 2025
@athanp if you have the time and want to help provide some test debug, could you compile with
CPPFLAGS+=-DPRIVSEP_DEBUGand post some logs.It will be very very verbose. You could also email them to me at
[email protected]if you prefer not to post here.asagratini commentedon Dec 26, 2025
I compiled this branch with
CPPFLAGS+=-DPRIVSEP_DEBUGon FreeBSD 15.0 and I am attaching both stdout and dhcpcd logs to this responsedhcpcd.log
stdout.log
Here's my dhcpcd.conf:
Let me know if you need anything else, thank you
rsmarples commentedon Dec 28, 2025
I'm using
FreeBSD 15.0-RELEASE (GENERIC) releng/15.0-n280995-7aedc8de6446and I just cannot replicate this.I have this running on a QEMU VM on my NetBSD host and I've created a lot of tap devices and renamed them to match the above and use the same config and it just works for me.
Is it possible for anyone to downgrade to FreeBSD-14 to see if the issue is there still so we can work out if it's only FreeBSD-15 affected?
asagratini commentedon Dec 28, 2025
no worries! Everything seems to be working as expected on FreeBSD 14.3, as also pointed out by @athanp....
To give you a bit more context on my network set up, here's the configuration for the
voipinterface:while the interface called
internetis created using mpd5 (it uses netgraph, if this is relevant) as pppoe client to authenticate with my ISP.Here's the relevant configuration for the network interface used by mpd:
and here is my mpd.conf file:
I know we can compile the software with
--disable-privsepoption, but it does not seem a solution to me :)Let me know if you need anything else, thank you
rsmarples commentedon Dec 28, 2025
Hmmm, both of you use pppoe via mpd5. Is that the common cause? I'll see if I can setup a PPPoE server and mirror the config.
Likely take some time as I really hate debugging PPPoE and I'm not good at setting this up.
asagratini commentedon Dec 28, 2025
exactly, this is what I see in my dhcpcd.log file if only the
voipinterface is available on the 15.0 system:so that possibly means things are working as expected, if I read it right?
rsmarples commentedon Dec 28, 2025
@asagratini ah, @athanp said that 10.2.4 was working fine on FreeBSD-14, can you be more specific please? Have to you tested 10.3.0 and/or the privsep-recvmsg branch we are testing here?
asagratini commentedon Dec 28, 2025
right, all the information I shared is when using 10.3.0 version with the privsep-recvmsg branch, apologies if I did not mention this earlier in the thread
rsmarples commentedon Dec 28, 2025
No, things are not working that is just co-incidence. Example errors below:
None of these should happen.
athanp commentedon Dec 29, 2025
I'm sorry I couldn't help with debug info and the rest, but I'm away from my lab on a Christmas vacation trip.
What is certain is that with a direct ethernet connection (no PPPoE) it works without problems, while with PPPoE it does not.
In the latter case, it was necessary to build it with --disable-privsep, which works without any problems with the mpd5 pppoe client and the ng0 created interface.
1 remaining item
asagratini commentedon Dec 30, 2025
@rsmarples is the issue I am seeing on the
voipinterface a different one or is related with the ppoe/mpd5 one we're seeing in this thread? Thank youdriesmp commentedon Feb 11, 2026
In my setup where it also fails, I also have VLAN's on top of a lagg. But I'm not using any pppoe.
This can't possibly be related?
asagratini commentedon Feb 11, 2026
mmh, @driesmp, if you check this message, you will notice my interfaces are using VLAN, though I understand pope and VLANs might be 2 separate issues here
rsmarples commentedon Feb 17, 2026
I've been hung on up a NetBSD with with PPPoE that has stopped me from working this.
I have a working patch for it now: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=59963
But if @driesmp is saying that this happens without PPPoE then I'm getting really confused as to what the trigger for this issue is as I really can't replicate it anymore at my end on the master branch.
asagratini commentedon Feb 17, 2026
exactly, I am also seeing these errors on one of non-PPPOE interfaces, on FreeBSD 15.0 with privileges separation enabled:
here's the interface
As @driesmp mentioned, it is a VLAN on top of a LAGG one
rsmarples commentedon Feb 18, 2026
@asagratini it's about all the interfaces on the host, not just the one dhcpcd is going to run on.
What's the full output of
ifconfig?asagratini commentedon Feb 18, 2026
that makes sense, thanks for clarifying!
Here's the output of ifconfig on affected host, where the interface called
internetis the PPPOE one:As you can see, I am running VLANs on top of a LAGG and using Jumbo Frames, too; let me know if you need anything else, thank you
If it matters, this is my
dhcpcd.conf:BSD: don't send uninitialised memory using ps_root_indirectioctl
alessandrosagratini-ookla commentedon Mar 9, 2026
@rsmarples I noticed this commit from a couple of days ago.
I compiled the code from source passing
./configure --enable-privsep --prefix=/usr/local/ --datadir=/usr/local/share/examples/ --privsepuser="_dhcp" --without-udevparameters during the configure option and now all the errors have disappeared for my use case.I would let the program run for some more time to see what happens, but I can see that issues are being resolved by that commit
perkelix commentedon Mar 9, 2026
@rsmarples have we got ourselves a new tarball?
rsmarples commentedon Mar 10, 2026
@athanp @driesmp does the master branch now fix this for you guys as well?
athanp commentedon Mar 12, 2026
@rsmarples YES, I confirm that the master branch fixed this issue!
Tested on FreeBSD 15 and 14.4 using direct ethernet as well as PPPoE wan interfaces. No core dump neither any suspicious log messages.
Great job with the bug hunting; It was a tough nut to crack!
badrpc commentedon Mar 15, 2026
Just upgraded FreeBSD to 15.0 today and run into non-working dhcpcd. It wasn't crashing in my case but rather was throwing weird "Invalid argument" errors. Rebuilding with commit 5272125 fixed my problems.
driesmp commentedon Mar 18, 2026
Works great after recent release!