mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 12:00:11 +01:00
When defining an IPv6 address with square brackets and prefix, like
[dead::beef]/64, the prefix was silently ignored. The address was
accepted only accidentally, because get_word replaced ']' with '\0' so
it resulted in a valid IPv6 address string, but without the prefix.
The previous commit has fixed get_word with better logic to handle the
square brackets, uncovering this issue.
Fix it by explicitly splitting IP addresses and prefixes in
reader_parse_ip so we get a valid address and prefix.
Also, use a prefix different to 64 in the test test_if_ip6_manual. 64 is
the default one, making that the test passed despite the defined prefix
was actually ignored.
Fixes:
|
||
|---|---|---|
| .. | ||
| tests | ||
| meson.build | ||
| nm-initrd-generator.c | ||
| nm-initrd-generator.h | ||
| nmi-cmdline-reader.c | ||
| nmi-dt-reader.c | ||
| nmi-ibft-reader.c | ||
| nmi-nbft-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