mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 12:50:09 +01:00
initrd: skip ethernet hwtype in BOOTIF
Dracut documents the BOOTIF argument to be a MAC address and so we
accept one in any of the conventions we recognize. However, the PXE boot
loaders like to prepend a "01-" to denote an ethernet hardware type.
Accept that too.
https://bugzilla.redhat.com/show_bug.cgi?id=1726240
(cherry picked from commit 2952953a48)
This commit is contained in:
parent
be01ba6d98
commit
5a565659fa
1 changed files with 10 additions and 0 deletions
|
|
@ -742,6 +742,16 @@ nmi_cmdline_reader_parse (const char *sysfs_dir, char **argv)
|
|||
NMConnection *connection;
|
||||
NMSettingWired *s_wired;
|
||||
|
||||
if ( !nm_utils_hwaddr_valid (bootif, ETH_ALEN)
|
||||
&& g_str_has_prefix (bootif, "01-")
|
||||
&& nm_utils_hwaddr_valid (&bootif[3], ETH_ALEN)) {
|
||||
/*
|
||||
* BOOTIF MAC address can be prefixed with a hardware type identifier.
|
||||
* "01" stays for "wired", no other are known.
|
||||
*/
|
||||
bootif += 3;
|
||||
}
|
||||
|
||||
connection = get_conn (connections, NULL, NM_SETTING_WIRED_SETTING_NAME);
|
||||
|
||||
s_wired = nm_connection_get_setting_wired (connection);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue