From: Lennart Poettering Date: Mon, 1 Jun 2026 08:23:50 +0000 (+0200) Subject: network: hook up "machine tag" concept, also with .network/.link/.netdev files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3d68a29374b41333cbb67afee51f9f78d3e5568;p=thirdparty%2Fsystemd.git network: hook up "machine tag" concept, also with .network/.link/.netdev files Follow-up for: 461ec6facc4291cbdb3264d473bcab3e1d88e13a --- diff --git a/man/systemd.link.xml b/man/systemd.link.xml index 1d6fbf9fb87..5f5930adf50 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -365,6 +365,20 @@ + + + MachineTag= + + Matches against the tags assigned to the local machine. See + ConditionMachineTag= in + systemd.unit5 + for details. When prefixed with an exclamation mark (!), the result is negated. + If an empty string is assigned, the previously assigned value is cleared. + + + + + diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml index 6879518b4b8..66d5334b37b 100644 --- a/man/systemd.netdev.xml +++ b/man/systemd.netdev.xml @@ -230,6 +230,7 @@ + diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 971dce73fc1..6b988e0e474 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -165,6 +165,7 @@ + diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf index 269a9745424..70af349108d 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf @@ -52,6 +52,7 @@ Match.Version, config_parse_net_condition, Match.Credential, config_parse_net_condition, CONDITION_CREDENTIAL, offsetof(NetDev, conditions) Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(NetDev, conditions) Match.Firmware, config_parse_net_condition, CONDITION_FIRMWARE, offsetof(NetDev, conditions) +Match.MachineTag, config_parse_net_condition, CONDITION_MACHINE_TAG, offsetof(NetDev, conditions) NetDev.Description, config_parse_string, 0, offsetof(NetDev, description) NetDev.Name, config_parse_ifname, 0, offsetof(NetDev, ifname) NetDev.Kind, config_parse_netdev_kind, 0, offsetof(NetDev, kind) diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 81b9784b49a..0b598f131d9 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -94,6 +94,7 @@ Match.Version, config_parse_net_condition, Match.Credential, config_parse_net_condition, CONDITION_CREDENTIAL, offsetof(Network, conditions) Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, conditions) Match.Firmware, config_parse_net_condition, CONDITION_FIRMWARE, offsetof(Network, conditions) +Match.MachineTag, config_parse_net_condition, CONDITION_MACHINE_TAG, offsetof(Network, conditions) Link.MACAddress, config_parse_hw_addr, 0, offsetof(Network, hw_addr) Link.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(Network, mtu) Link.Group, config_parse_link_group, 0, 0 diff --git a/src/udev/net/link-config-gperf.gperf b/src/udev/net/link-config-gperf.gperf index a005cadd49a..535c9e9dbb7 100644 --- a/src/udev/net/link-config-gperf.gperf +++ b/src/udev/net/link-config-gperf.gperf @@ -40,6 +40,7 @@ Match.Version, config_parse_net_condition, Match.Credential, config_parse_net_condition, CONDITION_CREDENTIAL, 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) +Match.MachineTag, config_parse_net_condition, CONDITION_MACHINE_TAG, offsetof(LinkConfig, conditions) Link.Description, config_parse_string, 0, offsetof(LinkConfig, description) /* udev property */ Link.Property, config_parse_udev_property, 0, offsetof(LinkConfig, properties)