]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(net-lib): always include af_packet
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 9 Aug 2025 22:24:32 +0000 (18:24 -0400)
committerBenjamin Drung <bdrung@ubuntu.com>
Fri, 15 Aug 2025 12:36:54 +0000 (14:36 +0200)
For static IPv4 configurations, we use arping to check for duplicate
IP addresses. arping requires the af_packet module to work, and if arping
fails, the IP address will not be set and booting will fail.
af_packet may not be loaded / required in the running system, for example if
the system had been booted in an IPv6 configuration, or if it had been
manually unloaded. Make sure it's included in initramfs in hostonly mode, too.

Follow-up to b0742165e1fec168 and to de862885e .

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1437
modules.d/35network-legacy/module-setup.sh
modules.d/45net-lib/module-setup.sh

index b99567f52de0fee8c2feee26717b0f5936fef6b4..d7162ad5273f14ba55b69308c504559e4bb0a9a3 100755 (executable)
@@ -14,12 +14,6 @@ depends() {
     return 0
 }
 
-# called by dracut
-installkernel() {
-    # arping depends on af_packet
-    hostonly='' instmods af_packet
-}
-
 # called by dracut
 install() {
     local _arch
index 34981542e795a1cd11aa0268f970c7d58e4c8518..42835ff535808f9130a1e0e1f89b1f56c76c9482 100755 (executable)
@@ -10,6 +10,12 @@ depends() {
     return 0
 }
 
+# called by dracut
+installkernel() {
+    # arping depends on af_packet
+    hostonly='' instmods af_packet
+}
+
 install() {
     inst_script "$moddir/netroot.sh" "/sbin/netroot"
     inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"