NetworkManager/src/nm-initrd-generator
Thomas Haller a23af8f764
glib-aux: avoid using inet_aton()
nm_inet_parse_bin_full() supports a legacy mode for IPv4, which used
inet_aton(). This is only used by initrd reader, which parses the
kernel command line as defined by dracut. Since that dracut API is old
and not defined by us, we want to be more forgiving in case a user
specifies something that used to work in the past. In particular,
we want to parse "255.256.256.000" as netmask (which inet_pton() would
reject).

inet_aton() trips off some ABI checkers that we shouldn't use this ABI.
It was anyway only used as *additional* guard when we parsed certain
legacy formats for IPv4 addresses. We can drop that and just use our
parser.

Note that there is still an nm_assert() path, which loads inet_aton()
dynamically, just to ensure that our legacy parser implementation is in
agree with inet_aton().

https://bugzilla.redhat.com/show_bug.cgi?id=2049134
2023-05-08 15:44:49 +02:00
..
tests tests: add tests for generating stable UUIDs for keyfile/initrd 2022-11-03 09:23:57 +01:00
meson.build build: fix linking libnm-log-null into different test programs 2021-07-05 14:51:27 +02:00
nm-initrd-generator.c clang-format: reformat code with clang-format 15.0.4-1.fc37 2022-11-23 09:17:21 +01:00
nm-initrd-generator.h initrd: generate initrd generator profiles with autoconnect-priority -100 2022-09-15 18:23:57 +02:00
nmi-cmdline-reader.c clang-format: reformat code with clang-format 15.0.4-1.fc37 2022-11-23 09:17:21 +01:00
nmi-dt-reader.c glib-aux: avoid using inet_aton() 2023-05-08 15:44:49 +02:00
nmi-ibft-reader.c glib-aux: add and use nm_uuid_generate_from_strings_old() 2022-10-11 09:03:17 +02:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00

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