summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-netdev-gperf.gperf7
-rw-r--r--src/network/networkd-netdev.c6
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd.h8
5 files changed, 14 insertions, 9 deletions
diff --git a/src/network/networkd-netdev-gperf.gperf b/src/network/networkd-netdev-gperf.gperf
index cdaacb18ae..7dd47f971f 100644
--- a/src/network/networkd-netdev-gperf.gperf
+++ b/src/network/networkd-netdev-gperf.gperf
@@ -15,9 +15,10 @@ struct ConfigPerfItem;
%struct-type
%includes
%%
-Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(NetDev, condition_host)
-Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(NetDev, condition_virt)
-Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, condition_kernel)
+Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(NetDev, match_host)
+Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(NetDev, match_virt)
+Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, match_kernel)
+Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(NetDev, match_arch)
NetDev.Description, config_parse_string, 0, offsetof(NetDev, description)
NetDev.Name, config_parse_ifname, 0, offsetof(NetDev, name)
NetDev.Kind, config_parse_netdev_kind, 0, offsetof(NetDev, kind)
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 773163d76c..c3bda6da84 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -364,9 +364,9 @@ static int netdev_load_one(Manager *manager, const char *filename) {
return log_oom();
if (net_match_config(NULL, NULL, NULL, NULL, NULL,
- netdev->condition_host, netdev->condition_virt,
- netdev->condition_kernel, NULL, NULL, NULL,
- NULL, NULL) <= 0)
+ netdev->match_host, netdev->match_virt,
+ netdev->match_kernel, netdev->match_arch,
+ NULL, NULL, NULL, NULL, NULL) <= 0)
return 0;
r = hashmap_put(netdev->manager->netdevs, netdev->name, netdev);
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 011f7e9038..44aeb9c3ae 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -23,6 +23,7 @@ Match.Name, config_parse_ifname, 0,
Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(Network, match_host)
Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(Network, match_virt)
Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, match_kernel)
+Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, match_arch)
Network.Description, config_parse_string, 0, offsetof(Network, description)
Network.Bridge, config_parse_bridge, 0, offsetof(Network, bridge)
Network.Bond, config_parse_bond, 0, offsetof(Network, bond)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 3119471fa2..2e68bec2e7 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -177,6 +177,7 @@ int network_get(Manager *manager, struct udev_device *device, Network **ret) {
network->match_driver, network->match_type,
network->match_name, network->match_host,
network->match_virt, network->match_kernel,
+ network->match_arch,
udev_device_get_sysattr_value(device, "address"),
udev_device_get_property_value(device, "ID_PATH"),
udev_device_get_driver(udev_device_get_parent(device)),
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 8008df5a79..fb0976491c 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -71,9 +71,10 @@ struct NetDev {
char *filename;
- Condition *condition_host;
- Condition *condition_virt;
- Condition *condition_kernel;
+ Condition *match_host;
+ Condition *match_virt;
+ Condition *match_kernel;
+ Condition *match_arch;
char *description;
char *name;
@@ -100,6 +101,7 @@ struct Network {
Condition *match_host;
Condition *match_virt;
Condition *match_kernel;
+ Condition *match_arch;
char *description;
NetDev *bridge;