NetworkConfiguration / dhcpcd

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

dhcp6_listen: Address in use #321

Open proukornew opened 6 months ago

proukornew commented 6 months ago

dhcpcd config (https://openwrt.org/packages/pkgdata/dhcpcd + v10.0.6): interface some0 duid noipv4 timeout 10 ipv6rs ia_pd 1

netstat: Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 :::546 ::: 19457/odhcp6c udp 0 0 :::547 ::: 1823/odhcpd udp 0 0 :::547 ::: 1823/odhcpd udp 0 0 :::53 ::: 3542/unbound

log: dhcpcd-10.0.6 starting ... dhcp6_openudp: Address in use dhcp6_start1: Address in use ... some0: requesting DHCPv6 information dhcp6_sendmessage: some0: sendmsg: Bad file descriptor dhcp6_sendmessage: some0: sendmsg: Bad file descriptor dhcp6_sendmessage: some0: sendmsg: Bad file descriptor dhcp6_sendmessage: some0: sendmsg: Bad file descriptor some0: failed to request DHCPv6 information dhcp6_sendmessage: some0: sendmsg: Bad file descriptor dhcp6_sendmessage: some0: sendmsg: Bad file descriptor

behavior: trying to acquire unspecified address with silent log&non-use PD. expected: using ll-address for socket from specified interface.

perkelix commented 6 months ago

What version? What distro?

NOTE: odhcpd is not the same as dhcpcd.

rsmarples commented 6 months ago

Two different DHCP clients is never a good idea.

@proukornew you can solve this by starting dhcpcd on a specific interface like dhcpcd eth0, but this won't work in future dhcpcd versions.

You either want to use odhcpc or dhcpcd, not both :)

proukornew commented 6 months ago

netstat -unpl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name ... udp 0 0 fe80::1d10:7ff:fe1d:107:546 :::* 28829/dhclient

not a bug client of healthy human vs narcoleptic client

perkelix commented 6 months ago

@proukornew dhclient is yet a third DHCP implementation. For obvious reasons, if you have so many DHCP clients installed on the same host, things are unlikely to work well.

rsmarples commented 6 months ago

And what's your point here? If you open dhcpcd in manager mode (which is the default with no interfaces listed and will be the only option in dhcpcd-11), it expects to open the dhcp client sockets on the unspecified address.

If it cannot do that, you get warned about it rather than sweeping errors under the table. See #271 for why we will be going down this route.