Skip to content

Commit 5d138e5

Browse files
committed
dhcpv6: T7807: replace wide-dhcp6c with dhcpcd
- Add a custom build of dhcpcd (to disable ipv4 and link-local address management). - Remove the wide-dhcpv6 build pipeline.
1 parent 81c74e9 commit 5d138e5

12 files changed

Lines changed: 106 additions & 415 deletions

.github/workflows/trigger_rebuild_packages.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
- 'scripts/package-build/bash-completion/**'
3636
ddclient:
3737
- 'scripts/package-build/ddclient/**'
38+
dhcpcd:
39+
- 'scripts/package-build/dhcpcd/**'
3840
dropbear:
3941
- 'scripts/package-build/dropbear/**'
4042
ethtool:
@@ -96,8 +98,6 @@ jobs:
9698
- 'scripts/package-build/vpp/**'
9799
waagent:
98100
- 'scripts/package-build/waagent/**'
99-
wide-dhcpv6:
100-
- 'scripts/package-build/wide-dhcpv6/**'
101101
xen-guest-agent:
102102
- 'scripts/package-build/xen-guest-agent/**'
103103
zerotier-one:
@@ -143,6 +143,10 @@ jobs:
143143
trigger_build "ddclient"
144144
fi
145145
146+
if [ "${{ steps.changes.outputs.dhcpcd }}" == "true" ]; then
147+
trigger_build "dhcpcd"
148+
fi
149+
146150
if [ "${{ steps.changes.outputs.dropbear }}" == "true" ]; then
147151
trigger_build "dropbear"
148152
fi
@@ -263,10 +267,6 @@ jobs:
263267
trigger_build "waagent"
264268
fi
265269
266-
if [ "${{ steps.changes.outputs.wide-dhcpv6 }}" == "true" ]; then
267-
trigger_build "ethtool"
268-
fi
269-
270270
if [ "${{ steps.changes.outputs.xen-guest-agent }}" == "true" ]; then
271271
trigger_build "xen-guest-agent"
272272
fi

data/live-build-config/hooks/live/18-enable-disable_services.chroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ systemctl disable apt-daily.timer
3131
systemctl disable apt-daily-upgrade.timer
3232
systemctl disable apt-daily-upgrade.service
3333
systemctl disable chrony.service
34+
systemctl disable dhcpcd.service
3435
systemctl disable igmpproxy.service
35-
systemctl disable wide-dhcpv6-client.service
3636
systemctl disable lm-sensors.service
3737
systemctl disable snmpd.service
3838
systemctl disable conserver-server.service
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dhcpcd/
2+
*.deb
3+
*.buildinfo
4+
*.changes
5+
*.dsc
6+
*.tar.*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[[packages]]
2+
name = "dhcpcd"
3+
commit_id = "debian/1%10.1.0-11+deb13u2"
4+
scm_url = "https://salsa.debian.org/debian/dhcpcd.git"
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Description: Add --disable-lladdr configure knob
2+
When --disable-lladdr is passed, the IN6_ADDR_GEN_MODE_NONE detection
3+
check is skipped, leaving HAVE_IN6_ADDR_GEN_MODE_NONE undefined.
4+
The existing #ifdef HAVE_IN6_ADDR_GEN_MODE_NONE / #else structure in
5+
src/ipv6.c causes CAN_ADD_LLADDR() to evaluate to 0, so
6+
ipv6_tryaddlinklocal() returns early and link-local address management
7+
is effectively compiled out. No changes to .c or .h files.
8+
Author: VyOS Package Maintainers <maintainers@vyos.net>
9+
Forwarded: not-needed
10+
Last-Update: 2026-04-29
11+
12+
--- a/configure
13+
+++ b/configure
14+
@@ -39,6 +39,7 @@ SMALL=
15+
SANITIZE=no
16+
STATUSARG=
17+
OPENSSL=
18+
+LLADDR=
19+
20+
DHCPCD_DEFS=dhcpcd-definitions.conf
21+
22+
@@ -77,6 +78,8 @@ for x do
23+
--enable-seccomp) SECCOMP=yes;;
24+
--disable-ntp) NTP=no;;
25+
--enable-ntp) NTP=yes;;
26+
+ --disable-lladdr) LLADDR=no;;
27+
+ --enable-lladdr) LLADDR=yes;;
28+
--privsepuser) PRIVSEP_USER=$var;;
29+
--prefix) PREFIX=$var;prefix=$var;; # prefix is set for autotools compat
30+
--sysconfdir) SYSCONFDIR=$var;;
31+
@@ -700,21 +703,25 @@ EOF
32+
fi
33+
rm -f _nl80211.c _nl80211
34+
35+
- printf "Testing for IN6_ADDR_GEN_MODE_NONE ... "
36+
- cat <<EOF >_IN6_ADDR_GEN_MODE_NONE.c
37+
+ if [ "$LLADDR" = no ]; then
38+
+ printf "Skipping IN6_ADDR_GEN_MODE_NONE (--disable-lladdr)\n"
39+
+ else
40+
+ printf "Testing for IN6_ADDR_GEN_MODE_NONE ... "
41+
+ cat <<EOF >_IN6_ADDR_GEN_MODE_NONE.c
42+
#include <linux/if_link.h>
43+
int main(void) {
44+
int x = IN6_ADDR_GEN_MODE_NONE;
45+
return x;
46+
}
47+
EOF
48+
- if $XCC _IN6_ADDR_GEN_MODE_NONE.c -o _IN6_ADDR_GEN_MODE_NONE 2>&3; then
49+
- echo "yes"
50+
- echo "#define HAVE_IN6_ADDR_GEN_MODE_NONE" >>$CONFIG_H
51+
- else
52+
- echo "no"
53+
+ if $XCC _IN6_ADDR_GEN_MODE_NONE.c -o _IN6_ADDR_GEN_MODE_NONE 2>&3; then
54+
+ echo "yes"
55+
+ echo "#define HAVE_IN6_ADDR_GEN_MODE_NONE" >>$CONFIG_H
56+
+ else
57+
+ echo "no"
58+
+ fi
59+
+ rm -f _IN6_ADDR_GEN_MODE_NONE.c _IN6_ADDR_GEN_MODE_NONE
60+
fi
61+
- rm -f _IN6_ADDR_GEN_MODE_NONE.c _IN6_ADDR_GEN_MODE_NONE
62+
else
63+
printf "Testing for ifam_pid ... "
64+
cat <<EOF >_ifam_pid.c
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Description: Pass --disable-lladdr and IPv4-related flags to configure
2+
Extends the debian/rules configure invocation to pass --disable-lladdr,
3+
--disable-ipv4, --disable-arp, --disable-arping, and --disable-ipv4ll.
4+
The resulting VyOS dhcpcd build is IPv6-only with link-local address
5+
management absent from the binary entirely.
6+
Author: VyOS Package Maintainers <maintainers@vyos.net>
7+
Forwarded: not-needed
8+
Last-Update: 2026-04-29
9+
10+
--- a/debian/rules
11+
+++ b/debian/rules
12+
@@ -13,7 +13,12 @@ override_dh_auto_configure:
13+
--libexecdir=/usr/lib/dhcpcd \
14+
--rundir=/run/dhcpcd \
15+
--with-openssl \
16+
- --with-hooks="timesyncd.conf"
17+
+ --with-hooks="timesyncd.conf" \
18+
+ --disable-lladdr \
19+
+ --disable-ipv4 \
20+
+ --disable-arp \
21+
+ --disable-arping \
22+
+ --disable-ipv4ll
23+
24+
# Avoid starting the unconfigured service as it may break connectivity.
25+
override_dh_installinit:

scripts/package-build/wide-dhcpv6/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/package-build/wide-dhcpv6/build.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/package-build/wide-dhcpv6/package.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

scripts/package-build/wide-dhcpv6/patches/wide-dhcpv6/0023-dhcpc6-support-per-interface-client-DUIDs.patch

Lines changed: 0 additions & 230 deletions
This file was deleted.

0 commit comments

Comments
 (0)