From 65cd81815dcdc6d0fdc3e43487c40faf0adb7c07 Mon Sep 17 00:00:00 2001 From: PopSolutions Date: Tue, 24 Mar 2026 13:40:45 +0000 Subject: [PATCH 1/3] Replace udhcpc with dhcpcd for dual-stack DHCPv4/DHCPv6 support - Switch from udhcpc (IPv4-only) to dhcpcd (dual-stack v4+v6) - Add inet6 dhcp stanzas to interfaces overlay for eth0 and eth1 - Remove udhcpc-fix overlay (resolvconf integration handled natively by dhcpcd) - Mask dhcpcd.service daemon to prevent conflict with ifupdown (ifupdown invokes dhcpcd on-demand via ifup/ifdown) Tested: ifupdown 0.8.44 (Trixie) natively supports dhcpcd-base. With daemon masked, ifup eth0 successfully obtains both DHCPv4 and DHCPv6 (SLAAC) addresses using a single package. This enables dual-stack IPv4+IPv6 out of the box for all TKL v19 appliances without breaking confconsole/ifupdown integration. --- .../etc/systemd/system/dhcpcd.service | 1 + .../interfaces/etc/network/interfaces | 2 + .../udhcpc-fix/etc/udhcpc/default.script | 67 ------------------- plans/net | 2 +- 4 files changed, 4 insertions(+), 68 deletions(-) create mode 120000 overlays/turnkey.d/dhcpcd-noauto/etc/systemd/system/dhcpcd.service delete mode 100755 overlays/turnkey.d/udhcpc-fix/etc/udhcpc/default.script diff --git a/overlays/turnkey.d/dhcpcd-noauto/etc/systemd/system/dhcpcd.service b/overlays/turnkey.d/dhcpcd-noauto/etc/systemd/system/dhcpcd.service new file mode 120000 index 00000000..dc1dc0cd --- /dev/null +++ b/overlays/turnkey.d/dhcpcd-noauto/etc/systemd/system/dhcpcd.service @@ -0,0 +1 @@ +/dev/null \ No newline at end of file diff --git a/overlays/turnkey.d/interfaces/etc/network/interfaces b/overlays/turnkey.d/interfaces/etc/network/interfaces index 50435040..ba3b9902 100644 --- a/overlays/turnkey.d/interfaces/etc/network/interfaces +++ b/overlays/turnkey.d/interfaces/etc/network/interfaces @@ -6,8 +6,10 @@ iface lo inet loopback auto eth0 iface eth0 inet dhcp +iface eth0 inet6 dhcp hostname _UNCONFIGURED_ allow-hotplug eth1 iface eth1 inet dhcp +iface eth1 inet6 dhcp hostname _UNCONFIGURED_ diff --git a/overlays/turnkey.d/udhcpc-fix/etc/udhcpc/default.script b/overlays/turnkey.d/udhcpc-fix/etc/udhcpc/default.script deleted file mode 100755 index a9a3e977..00000000 --- a/overlays/turnkey.d/udhcpc-fix/etc/udhcpc/default.script +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# Busybox udhcpc dispatcher script. Copyright (C) 2009 by Axel Beckert. -# -# Based on the busybox example scripts and the old udhcp source -# package default.* scripts. - -RESOLV_CONF="/etc/resolv.conf" - -case $1 in - bound|renew) - [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" - [ -n "$subnet" ] && NETMASK="netmask $subnet" - - /sbin/ifconfig $interface $ip $BROADCAST $NETMASK - - if [ -n "$router" ]; then - echo "$0: Resetting default routes" - while /sbin/route del default gw 0.0.0.0 dev $interface; do :; done - - metric=0 - for i in $router; do - if [ "$subnet" = "255.255.255.255" ]; then - /sbin/ip route add default via $i dev $interface metric $metric onlink - else - /sbin/ip route add default via $i dev $interface metric $metric - fi - metric=$(($metric + 1)) - done - fi - - # Update resolver configuration file - R="" - [ -n "$domain" ] && R="domain $domain -" - for i in $dns; do - echo "$0: Adding DNS $i" - R="${R}nameserver $i -" - done - - if [ -x /sbin/resolvconf ]; then - echo -n "$R" | resolvconf -a "${interface}.udhcpc" - else - echo -n "$R" > "$RESOLV_CONF" - fi - ;; - - deconfig) - if [ -x /sbin/resolvconf ]; then - resolvconf -d "${interface}.udhcpc" - fi - /sbin/ifconfig $interface 0.0.0.0 - ;; - - leasefail) - echo "$0: Lease failed: $message" - ;; - - nak) - echo "$0: Received a NAK: $message" - ;; - - *) - echo "$0: Unknown udhcpc command: $1"; - exit 1; - ;; -esac diff --git a/plans/net b/plans/net index 8f302c3d..52688f18 100644 --- a/plans/net +++ b/plans/net @@ -5,6 +5,6 @@ bind9-host # Version of 'host' bundled with BIND 9.X netbase # Basic TCP/IP networking system net-tools # The NET-3 networking toolkit iproute2 # networking and traffic control tools -udhcpc # very small DHCP client +dhcpcd # Also very small DHCPv4 and DHCPv6 client traceroute # Traces the route taken by packets over a tcp/ip network iputils-ping # Tools to test the reachability of network hosts From 837c723dc1f6be3488b325c8652798a66baf36bf Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Tue, 14 Apr 2026 15:26:35 +1000 Subject: [PATCH 2/3] Use dhcpcd-base instead and disable ARP probe --- conf/turnkey.d/dhcpcd-disable-arp | 10 ++++++++++ .../dhcpcd-noauto/etc/systemd/system/dhcpcd.service | 1 - plans/net | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 conf/turnkey.d/dhcpcd-disable-arp delete mode 120000 overlays/turnkey.d/dhcpcd-noauto/etc/systemd/system/dhcpcd.service diff --git a/conf/turnkey.d/dhcpcd-disable-arp b/conf/turnkey.d/dhcpcd-disable-arp new file mode 100755 index 00000000..28daf643 --- /dev/null +++ b/conf/turnkey.d/dhcpcd-disable-arp @@ -0,0 +1,10 @@ +#!/bin/bash -e + +if ! grep -s '^noarp' /etc/dhcpcd.conf; then + cat >> /etc/dhcpcd.conf < Date: Wed, 15 Apr 2026 06:48:04 +1000 Subject: [PATCH 3/3] Enable networking.service (& renamed conf script accordingly) --- conf/turnkey.d/{dhcpcd-disable-arp => networking} | 3 +++ 1 file changed, 3 insertions(+) rename conf/turnkey.d/{dhcpcd-disable-arp => networking} (71%) diff --git a/conf/turnkey.d/dhcpcd-disable-arp b/conf/turnkey.d/networking similarity index 71% rename from conf/turnkey.d/dhcpcd-disable-arp rename to conf/turnkey.d/networking index 28daf643..1c76f87d 100755 --- a/conf/turnkey.d/dhcpcd-disable-arp +++ b/conf/turnkey.d/networking @@ -1,5 +1,8 @@ #!/bin/bash -e +# it should be enabled by default but doesn't appear to be? +systemctl enable networking.service + if ! grep -s '^noarp' /etc/dhcpcd.conf; then cat >> /etc/dhcpcd.conf <