NetworkConfiguration / dhcpcd

DHCP / IPv4LL / IPv6RA / DHCPv6 client.
https://roy.marples.name/projects/dhcpcd
BSD 2-Clause "Simplified" License
348 stars 112 forks source link

dhcpcd -U times out before DHCPv6 information is displayed when privsep is enabled #205

Closed zacknewman closed 1 year ago

zacknewman commented 1 year ago

dhcpcd times out at least 75% of the time when I run dhcpcd -U em0 on version 9.4.1. On version 10.0.1 as well as master it times out 100% of the time. When I compile master without privsep, it times out 0% of the time though. When it does time out with privsep, it always reports DHCP information but times out before outputting DHCPv6 information.

router$ uname -a
OpenBSD router.philomathiclife.com 7.3 GENERIC.MP#1125 amd64
router$ dhcpcd --version
dhcpcd 10.0.1
Copyright (c) 2006-2023 Roy Marples
Compiled in features: INET ARP ARPing IPv4LL INET6 DHCPv6 AUTH PRIVSEP
router$ cat /etc/dhcpcd.conf
noipv6rs
denyinterfaces !(em0)
allowinterfaces em0
script ""
interface em0
    duid
    iaid 0
    ia_na 0
    ia_pd 0/::/60
    ipv6rs
    leasetime -1
    nooption domain_name,domain_name_servers,domain_search,fqdn,host_name,ntp_servers,time_offset,time_servers
    option rapid_commit
    persistent
    require dhcp_server_identifier
    waitip 6 4
router$ dhcpcd -U em0
reason=CARRIER
interface=em0
protocol=link
if_configured=true
ifcarrier=up
ifmetric=0
ifwireless=0
ifflags=34883
ifmtu=1500

reason=BOUND
interface=em0
protocol=dhcp
ip_address=73.14.244.157
subnet_cidr=23
network_number=73.14.244.0
subnet_mask=255.255.254.0
routers=73.14.244.1
broadcast_address=255.255.255.255
dhcp_lease_time=281243
dhcp_message_type=5
dhcp_server_identifier=96.113.84.152
dhcp_renewal_time=108443
dhcp_rebinding_time=238043

dhcpcd_readdumptimeout
rsmarples commented 1 year ago

I can reproduce this on all BSDs, works at first but then fails on a few subsequent goes.

rsmarples commented 1 year ago

With this change I now see a few errors in the dhcpcd process terminal but the dhcpcd status request works fine I think. Let me know either way please!

zacknewman commented 1 year ago

When I am back home later this week, I'll re-compile master and see if dhcpcd -U em0 works.

zacknewman commented 1 year ago

This works fine now. Hasn't timed out once.