Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcp6_listen: Address in use #321

Open
proukornew opened this issue May 10, 2024 · 5 comments
Open

dhcp6_listen: Address in use #321

proukornew opened this issue May 10, 2024 · 5 comments

Comments

@proukornew
Copy link

proukornew commented May 10, 2024

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
Copy link
Contributor

What version? What distro?

NOTE: odhcpd is not the same as dhcpcd.

@rsmarples
Copy link
Member

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
Copy link
Author

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
Copy link
Contributor

@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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants