mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 03:40:07 +01:00
With "ip=dhcp,dhcp6" the legacy dracut module does first DHCPv4 and then IPv6 autoconf (even if DHCPv4 succeeded) [1]. In this way, there is the guarantee that an address family is always configured if the network supports it. Currently "ip=dhcp,dhcp6" is treated a bit differently by NM, which generates a connection with only ipv4.required-timeout=20s. Therefore it's possible that NM in initrd quits (or signals startup-complete) without an IPv6 even if the network is configured for IPv6. Make NM's behavior similar to the legacy module by also setting an ipv6.required-timeout for "ip=dhcp,dhcp6". Note that if the command line contains "rd.neednet=1" without an "ip=" argument, we still generate a default connection with IPv4 preferred over IPv6 (i.e. only ipv4.required-timeout set). That's similar to what the legacy module does [2]. See [3] for a description of different scenarios for "rd.neednet=1". [1] https://github.com/dracutdevs/dracut/blob/055/modules.d/35network-legacy/ifup.sh#L459-L484 [2] https://github.com/dracutdevs/dracut/blob/055/modules.d/35network-legacy/ifup.sh#L529-L537 [3] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/729 https://bugzilla.redhat.com/show_bug.cgi?id=1961666 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/994 |
||
|---|---|---|
| .. | ||
| tests | ||
| meson.build | ||
| nm-initrd-generator.c | ||
| nm-initrd-generator.h | ||
| nmi-cmdline-reader.c | ||
| nmi-dt-reader.c | ||
| nmi-ibft-reader.c | ||
| README.md | ||
nm-initrd-generator
A command line tool that generates NetworkManager configuration.
This is supposed to be run by dracut in initrd, before NetworkManager starts. It parses the kernel command line, generates configuration and quits.
See:
man 8 nm-initrd-generator([www])man 7 dracut.cmdline