NetworkManager/src
Beniamino Galvani b0c018830e initrd: fix parsing of ip= arguments with empty first token
The parser checks if the first token of an ip= argument is an IP
address to determine which of the two possible syntaxes is used:

 ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]]
 ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<mtu>][:<macaddr>]]

This works as long as the first token is not empty, which - according
to the dracut.cmdline man page - seems to be guaranteed.

However, the network-legacy dracut plugin accepts an empty interface
or client IP. Also, if a user needs DHCP and wants to specify a
hostname, the only possible syntax is:

 ip=::::<hostname>::dhcp

Change the parser to check the second token instead, similarly to what
the network-legacy module does [1].

[1] https://github.com/dracutdevs/dracut/blob/050/modules.d/40network/net-lib.sh#L490

https://bugzilla.redhat.com/show_bug.cgi?id=1900260
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/693
2020-11-26 17:41:40 +01:00
..
devices core: use nm_ip_config_iter_ip_route_for_each() in _get_route_table_sync_mode_stateful() 2020-11-24 08:53:00 +01:00
dhcp all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
dns trivial: fix coding style 2020-11-24 18:51:58 +01:00
dnsmasq all: drop unnecessary cast for return value of g_object_new() 2020-11-12 16:03:09 +01:00
initrd initrd: fix parsing of ip= arguments with empty first token 2020-11-26 17:41:40 +01:00
ndisc all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
platform platform: rework nm_platform_dedup_multi_iter_next_*() and add more implementations 2020-11-24 08:52:58 +01:00
ppp ppp: drop unnecessary cast for return value of g_object_new() (manually) 2020-11-12 16:08:17 +01:00
settings all: add hostname setting 2020-11-16 16:43:39 +01:00
supplicant wifi: use NMEtherAddr struct for bssid 2020-11-19 20:17:03 +01:00
systemd systemd: merge branch systemd into master 2020-10-08 10:42:27 +02:00
tests core/trivial: rename nm_utils_get_reverse_dns_domains_ip*() functions 2020-11-24 08:52:59 +01:00
vpn all: drop unnecessary cast for return value of g_object_new() 2020-11-12 16:03:09 +01:00
main-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
main-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
main.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
meson.build l3cfg: add support for IPv4 link local addresses (ipv4ll) to NML3Cfg 2020-10-23 17:11:57 +02:00
NetworkManagerUtils.c core: cleanup IPv4/IPv6 checks using NM_IS_IPv4() 2020-10-30 16:52:59 +01:00
NetworkManagerUtils.h core: add nm_utils_share_rules_add_all_rules() for constructing iptables rules 2020-10-27 17:40:19 +01:00
nm-act-request.c all: drop unnecessary cast for return value of g_object_new() 2020-11-12 16:03:09 +01:00
nm-act-request.h core: refactor tracking of shared-rules to use NMUtilsShareRules 2020-10-27 17:40:19 +01:00
nm-active-connection.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-active-connection.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-audit-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-audit-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-auth-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-auth-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-auth-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-auth-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-checkpoint-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-checkpoint-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-checkpoint.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-checkpoint.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-config-data.c all/trivial: rename _nm_utils_strv_equal()/_nm_utils_strv_cmp_n() to have no leading underscore 2020-10-12 22:18:26 +02:00
nm-config-data.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-config.c iwd: Add the wifi.iwd.autoconnect setting 2020-11-19 10:12:04 +01:00
nm-config.h iwd: Add the wifi.iwd.autoconnect setting 2020-11-19 10:12:04 +01:00
nm-connectivity.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-connectivity.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-core-utils.c core/trivial: rename nm_utils_get_reverse_dns_domains_ip*() functions 2020-11-24 08:52:59 +01:00
nm-core-utils.h core: add nm_utils_get_reverse_dns_domains_ip() helper 2020-11-24 08:52:59 +01:00
nm-dbus-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-object.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-object.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dcb.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dcb.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dhcp-config.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dhcp-config.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dispatcher.c core/dispatcher: merge dump[46]_ip_to_props() for IPv4/IPv6 2020-10-30 11:58:46 +01:00
nm-dispatcher.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-firewall-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-firewall-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-hostname-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-hostname-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-iface-helper.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-ip-config.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-ip-config.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-ip4-config.c all: drop unnecessary cast for return value of g_object_new() 2020-11-12 16:03:09 +01:00
nm-ip4-config.h core: add nm_ip_config_is_ipv4() for dispatching NMIP[46]Config operations 2020-11-24 08:53:00 +01:00
nm-ip6-config.c all: drop unnecessary cast for return value of g_object_new() 2020-11-12 16:03:09 +01:00
nm-ip6-config.h core: add never-default field to NMIP{4,6}Config 2020-10-09 10:29:00 +02:00
nm-keep-alive.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-keep-alive.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-l3-config-data.c core: cleanup IPv4/IPv6 checks using NM_IS_IPv4() 2020-10-30 16:52:59 +01:00
nm-l3-config-data.h core: cleanup IPv4/IPv6 checks using NM_IS_IPv4() 2020-10-30 16:52:59 +01:00
nm-l3-ipv4ll.c l3cfg: let NML3Cfg return a singleton NML3IPv4LL instance 2020-10-27 17:04:20 +01:00
nm-l3-ipv4ll.h l3cfg: add nm_l3_ipv4ll_is_timed_out() for letting IPv4LL reach a failed state 2020-10-27 17:04:20 +01:00
nm-l3cfg.c core: cleanup IPv4/IPv6 checks using NM_IS_IPv4() 2020-10-30 16:52:59 +01:00
nm-l3cfg.h l3cfg: let NML3Cfg return a singleton NML3IPv4LL instance 2020-10-27 17:04:20 +01:00
nm-logging.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-logging.h shared,all: introduce and use LOGD_IPX()/LOGD_DHCPX() macros 2020-10-30 12:38:31 +01:00
nm-manager.c core: fix modifying connection during recheck_assume_connection() 2020-11-24 08:49:21 +01:00
nm-manager.h core: reverse the order of active connections in the manager 2020-11-16 16:43:39 +01:00
nm-netns.c core: use nm_clear_pointer() instead of g_clear_pointer() 2020-10-28 13:59:22 +01:00
nm-netns.h l3cfg: add nm_netns_get_l3cfg() accessor 2020-10-23 17:11:54 +02:00
nm-pacrunner-manager.c core: use nm_ip_config_iter_ip_address_for_each() in "nm-pacrunner-manager.c" 2020-11-24 08:52:59 +01:00
nm-pacrunner-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-policy.c dns: fix _dns_manager_set_ip_config() for missing device 2020-11-19 09:25:02 +01:00
nm-policy.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-proxy-config.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-proxy-config.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-rfkill-manager.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-rfkill-manager.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-session-monitor.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-session-monitor.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-sleep-monitor.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-sleep-monitor.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-test-utils-core.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-types.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
org.freedesktop.NetworkManager.conf dbus: pretty format "org.freedesktop.NetworkManager.conf" 2020-04-15 19:17:00 +02:00