]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev/net: support Match.Firmware= in .link files (#22462)
authorAlvin Šipraga <63646079+sipraga@users.noreply.github.com>
Thu, 10 Feb 2022 07:19:28 +0000 (08:19 +0100)
committerGitHub <noreply@github.com>
Thu, 10 Feb 2022 07:19:28 +0000 (16:19 +0900)
In cbcdcaaa0ec5 ("Add support for conditions on the machines firmware")
a new Firmware= directive was added for .netdev and .network files.
While it was also documented to work on .link files, in actual fact the
support was missing. Add that one extra line to make it work, and also
update the fuzzer directives.

src/udev/net/link-config-gperf.gperf
test/fuzz/fuzz-link-parser/directives.link
test/fuzz/fuzz-unit-file/directives-all.service

index fe33507694dd92aa8be42e01e2c2f19412644efa..17b3697077ce18bff8adb94341e0440d52431b59 100644 (file)
@@ -34,6 +34,7 @@ Match.Virtualization,                      config_parse_net_condition,
 Match.KernelCommandLine,                   config_parse_net_condition,            CONDITION_KERNEL_COMMAND_LINE, offsetof(LinkConfig, conditions)
 Match.KernelVersion,                       config_parse_net_condition,            CONDITION_KERNEL_VERSION,      offsetof(LinkConfig, conditions)
 Match.Architecture,                        config_parse_net_condition,            CONDITION_ARCHITECTURE,        offsetof(LinkConfig, conditions)
+Match.Firmware,                            config_parse_net_condition,            CONDITION_FIRMWARE,            offsetof(LinkConfig, conditions)
 Link.Description,                          config_parse_string,                   0,                             offsetof(LinkConfig, description)
 Link.MACAddressPolicy,                     config_parse_mac_address_policy,       0,                             offsetof(LinkConfig, mac_address_policy)
 Link.MACAddress,                           config_parse_hw_addr,                  0,                             offsetof(LinkConfig, hw_addr)
index bffdce0ec95af6ccb02d810624e1d0a3a8347594..eae76749eb6715f14acbc00c32013c778d90a9d4 100644 (file)
@@ -11,6 +11,7 @@ Virtualization=
 KernelCommandLine=
 KernelVersion=
 Architecture=
+Firmware=
 [Link]
 Description=
 MACAddressPolicy=
index 699a9c5ae4883e38948b811727bd36c101cf4794..3b5ea3f9e35ed40a68945a913051a1543bff627b 100644 (file)
@@ -386,6 +386,7 @@ AllowPortToBeRoot=
 AllowedIPs=
 Anonymize=
 Architecture=
+Firmware=
 AutoJoin=
 AutoNegotiation=
 BindCarrier=