diff options
author | Tom Gundersen <teg@jklm.no> | 2014-02-21 14:51:19 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-02-21 16:05:02 +0100 |
commit | edbb03e95a3c31bf719d5c6c46eec14d0bcb9c8f (patch) | |
tree | 5f9756ff846f5ed38cea48e5f5060376ed11b769 /src/shared | |
parent | 7a243b22041595a0c7e0dffb3ef5e2158dde933f (diff) |
.network/.netdev/.link: allow to match on architecture
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/net-util.c | 4 | ||||
-rw-r--r-- | src/shared/net-util.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/net-util.c b/src/shared/net-util.c index 6008a41dae..a8a2c44bae 100644 --- a/src/shared/net-util.c +++ b/src/shared/net-util.c @@ -39,6 +39,7 @@ bool net_match_config(const struct ether_addr *match_mac, Condition *match_host, Condition *match_virt, Condition *match_kernel, + Condition *match_arch, const char *dev_mac, const char *dev_path, const char *dev_driver, @@ -54,6 +55,9 @@ bool net_match_config(const struct ether_addr *match_mac, if (match_kernel && !condition_test_kernel_command_line(match_kernel)) return 0; + if (match_arch && !condition_test_architecture(match_arch)) + return 0; + if (match_mac && (!dev_mac || memcmp(match_mac, ether_aton(dev_mac), ETH_ALEN))) return 0; diff --git a/src/shared/net-util.h b/src/shared/net-util.h index a20b62e052..908fb22ffa 100644 --- a/src/shared/net-util.h +++ b/src/shared/net-util.h @@ -35,6 +35,7 @@ bool net_match_config(const struct ether_addr *match_mac, Condition *match_host, Condition *match_virt, Condition *match_kernel, + Condition *match_arch, const char *dev_mac, const char *dev_path, const char *dev_driver, |