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

dhcpcd fails to detect link-local IPv6 address if it has a 128-bit prefix #149

Closed
lark opened this issue Nov 8, 2022 · 8 comments
Closed

Comments

@lark
Copy link

lark commented Nov 8, 2022

This bug was reported by a debian user here
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019100

Report as following

Package: dhcpcd5
Version: 9.4.1-6
Severity: normal
Tags: ipv6
X-Debbugs-Cc: giorgos@skafidas.online

Dear Maintainer,

I use dhcpcd on two systems acting as routers to obtain IPv6 prefixes from ISPs and assign them to LAN interfaces.

Both systems use pppd (2.4.9-1+1.1+b1) to create PPPoE connections. Pppd uses a 128-bit prefix length for the link-local address assigned to the PPPoE interface.

dhcpcd 9.4.1-6 hangs at "delaying DHCPv6 for LL address" indefinitely. 9.4.1-5 works fine.

After trying other things, I manually added a /64 (rather than /128) link-local address to the PPPoE interface. Dhcpcd picked this up immediately and proceeded with DHCPv6 prefix delegation.

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 5.19.0-1-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=el_GR.UTF-8, LC_CTYPE=el_GR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dhcpcd5 depends on:
ii dhcpcd-base 9.4.1-6
ii lsb-base 11.2

dhcpcd5 recommends no packages.

Versions of packages dhcpcd5 suggests:
pn dhcpcd-gtk
pn openresolv | resolvconf

-- no debconf information

Debian maintainer's insight

The only change between 9.4.1-5 and 9.4.1-6 indeed is IPv6-related:

  • Merge patch from upstream Git: Use netlink to workout address flags.

This patch was taken straight from upstream Git and will be included
in the upcoming 9.4.2 release. If that change has any adverse effect,
I suggest opening a bug upstream
(https://github.com/NetworkConfiguration/dhcpcd/issues) and linking
this Debian bug to it.

The mentioned patch is commit 064767e

I am not the reporter but I was hit by this issue as well. Per debian maintainer's suggestion, I repost the bug here.

@rsmarples
Copy link
Member

I'm struggling to replicate this - with the latest dhcpcd-9 code base an ethernet interface works fine on Debian-11 with it has a /128 LL address.

What does the output of ip a look like on the machine with the error?

@perkelix
Copy link
Contributor

I am not the reporter but I was hit by this issue as well. Per debian maintainer's suggestion, I repost the bug here.

@lark Can you please post the output of the command as requested?

@Simpleton350
Copy link

Here is the output of ip a for the PPPoE interface:

8: wan_nova: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN group default qlen 3
link/ppp 
inet 130.43.X.X peer 213.16.246.6/32 scope global wan_nova
   valid_lft forever preferred_lft forever
inet6 fe80::a590:4cf5:1da1:5ab2 peer fe80::ae7a:56ff:fe12:3ef2/128 scope link 
   valid_lft forever preferred_lft forever

@perkelix
Copy link
Contributor

perkelix commented Feb 3, 2023

@lark ping?

@perkelix
Copy link
Contributor

perkelix commented Feb 8, 2023

@rsmarples Did the above provide sufficient information?

@lark
Copy link
Author

lark commented Mar 8, 2023

see output of ip a on the pppoe link

8: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc cake state UNKNOWN group default qlen 3
    link/ppp
    inet 114.x.x.x peer 114.x.x.x/32 scope global ppp0
       valid_lft forever preferred_lft forever
    inet6 fe80::414c:7433:5a2:364b peer fe80::727b:e8ff:fec2:c673/128 scope link
       valid_lft forever preferred_lft forever

rsmarples added a commit that referenced this issue May 8, 2023
PPP interfaces use IFA_LOCAL as the local address and IFA_ADDRESS
as the destination address
Non PPP interfaces use IFA_ADDRESS as the local address.
Confusing yes?

Anwyay, this should fix #201 and #149.
rsmarples added a commit that referenced this issue May 17, 2023
Rather than matching addresses during netlink message processing,
extract the local, address and flag parts.
Once done, then match local and address to the address we are
looking for and if equal apply the flags.

Should really fix #201 and maybe #149.
rsmarples added a commit that referenced this issue May 23, 2023
Rather than matching addresses during netlink message processing,
extract the local, address and flag parts.
Once done, then match local and address to the address we are
looking for and if equal apply the flags.

Fixes #201 and maybe #149.
@rsmarples
Copy link
Member

This should now be fixed in the master branch. @lark can you test please?

@sissy5775
Copy link

I'm a (German) Telekom customer and thus "blessed" with PPPoE, too.
Archlinux dhcpcd 9.4.1:

Jun 11 06:42:00 hadante systemd[1]: Starting dhcpcd on ppp0...
Jun 11 06:42:00 hadante dhcpcd[690414]: dhcpcd-9.4.1 starting
Jun 11 06:42:00 hadante dhcpcd[690419]: DUID 00:01:03:04:22:1e:e3:3b
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: IAID 00:00:00:01
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: soliciting a DHCPv6 lease
Jun 11 06:42:00 hadante dhcpcd[690419]: int: activating for delegation
Jun 11 06:42:00 hadante dhcpcd[690419]: int: IAID cb:9c:62:c4
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: soliciting an IPv6 router
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: Router Advertisement from fe80::de38:e1ff:fe10:e21d
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: adding address 2003:ce:6fff:40e5:58e3:e642:d0a0:f30d/64
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: adding route to 2003:ce:6fff:40e5::/64
Jun 11 06:42:00 hadante dhcpcd[690419]: ppp0: adding default route via fe80::de38:e1ff:fe10:e21d
Jun 11 06:42:00 hadante systemd[1]: Started dhcpcd on ppp0.
Jun 11 06:42:02 hadante dhcpcd[690419]: ppp0: ADV 2003:ce:6f27:7300::/56 from fe80::de38:e1ff:fe10:e21d
Jun 11 06:42:02 hadante dhcpcd[690419]: ppp0: REPLY6 received from fe80::de38:e1ff:fe10:e21d
Jun 11 06:42:02 hadante dhcpcd[690419]: ppp0: renew in 43200, rebind in 69120, expire in 86400 seconds
Jun 11 06:42:02 hadante dhcpcd[690419]: lo: adding reject route to 2003:ce:6f27:7300::/56
Jun 11 06:42:02 hadante dhcpcd[690419]: ppp0: delegated prefix 2003:ce:6f27:7300::/56
Jun 11 06:42:02 hadante dhcpcd[690419]: int: adding address 2003:ce:6f27:7300::1/64
Jun 11 06:42:02 hadante dhcpcd[690419]: int: adding route to 2003:ce:6f27:7300::/64
Jun 11 07:40:08 hadante dhcpcd[690419]: lo: pid 1 deleted reject route to 2003:ce:6f27:7300::/56
Jun 11 07:46:11 hadante dhcpcd[690419]: lo: adding reject route to 2003:ce:6f27:7300::/56

Archlinux dhcpcd 10.0.1:

Jun 11 06:40:00 hadante systemd[1]: Starting dhcpcd on ppp0...
Jun 11 06:40:00 hadante dhcpcd[690023]: dhcpcd-10.0.1 starting
Jun 11 06:40:00 hadante dhcpcd[690027]: DUID 00:01:03:04:22:1e:e3:3b
Jun 11 06:40:00 hadante dhcpcd[690027]: if_learnaddrs: if_addrflags6: fe80::58e3:e642:d0a0:f30d%ppp0: No such process
Jun 11 06:40:00 hadante dhcpcd[690023]: if_learnaddrs: if_addrflags6: fe80::58e3:e642:d0a0:f30d%ppp0: No such process
Jun 11 06:40:00 hadante dhcpcd[690027]: ppp0: IAID 00:00:00:01
Jun 11 06:40:01 hadante dhcpcd[690027]: ppp0: soliciting an IPv6 router
Jun 11 06:40:30 hadante dhcpcd[690027]: timed out
Jun 11 06:40:30 hadante dhcpcd[690023]: timed out
Jun 11 06:40:30 hadante dhcpcd[690027]: main: control_stop: No such file or directory
Jun 11 06:40:30 hadante dhcpcd[690023]: main: control_stop: No such file or directory
Jun 11 06:40:30 hadante dhcpcd[690027]: dhcpcd exited
Jun 11 06:40:30 hadante dhcpcd[690023]: dhcpcd_fork_cb: truncated read 0 (expected 4)

Archlinux current dhcpcd master source=("git+https://github.com/rsmarples/dhcpcd.git"), from AUR:

Jun 11 19:56:00 hadante dhcpcd[924134]: dhcpcd-10.0.1 starting
Jun 11 19:56:00 hadante dhcpcd[924138]: DUID 00:01:03:04:22:1e:e3:3b
Jun 11 19:56:00 hadante dhcpcd[924138]: ppp0: IAID 00:00:00:01
Jun 11 19:56:00 hadante dhcpcd[924138]: ppp0: rebinding prior DHCPv6 lease
Jun 11 19:56:00 hadante dhcpcd[924138]: int: activating for delegation
Jun 11 19:56:00 hadante dhcpcd[924138]: int: IAID cb:9c:62:c4
Jun 11 19:56:01 hadante dhcpcd[924138]: ppp0: soliciting an IPv6 router
Jun 11 19:56:01 hadante dhcpcd[924138]: ppp0: Router Advertisement from fe80::de38:e1ff:fe10:e21d
Jun 11 19:56:01 hadante dhcpcd[924138]: ppp0: adding address 2003:ce:6fff:32d4:c9bf:d5cd:ed02:e105/64
Jun 11 19:56:01 hadante dhcpcd[924138]: ppp0: adding route to 2003:ce:6fff:32d4::/64
Jun 11 19:56:01 hadante dhcpcd[924138]: ppp0: adding default route via fe80::de38:e1ff:fe10:e21d
Jun 11 19:56:01 hadante systemd[1]: Started dhcpcd on ppp0.
Jun 11 19:56:10 hadante dhcpcd[924138]: ppp0: failed to rebind prior DHCPv6 delegation
Jun 11 19:56:13 hadante dhcpcd[924138]: ppp0: ADV 2003:ce:6f31:1a00::/56 from fe80::de38:e1ff:fe10:e21d
Jun 11 19:56:13 hadante dhcpcd[924138]: ppp0: REPLY6 received from fe80::de38:e1ff:fe10:e21d
Jun 11 19:56:13 hadante dhcpcd[924138]: ppp0: renew in 43200, rebind in 69120, expire in 86400 seconds
Jun 11 19:56:13 hadante dhcpcd[924138]: lo: adding reject route to 2003:ce:6f31:1a00::/56
Jun 11 19:56:13 hadante dhcpcd[924138]: ppp0: delegated prefix 2003:ce:6f31:1a00::/56
Jun 11 19:56:13 hadante dhcpcd[924138]: int: adding address 2003:ce:6f31:1a00::1/64
Jun 11 19:56:13 hadante dhcpcd[924138]: int: adding route to 2003:ce:6f31:1a00::/64

So for me the issue is fixed, HTH!

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

5 participants