summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/network-internal.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-24 15:32:24 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-10-15 01:59:56 +0900
commit277ba8d1ab968f4c699c623a6bb17bd3b5fd17eb (patch)
tree1e2e6e50e94ef5b232d5bb62bc29e2cc7025190c /src/libsystemd-network/network-internal.c
parent0894cfe41c9edacc560c109f1a115922d0a045f3 (diff)
downloadsystemd-277ba8d1ab968f4c699c623a6bb17bd3b5fd17eb.tar.gz
systemd-277ba8d1ab968f4c699c623a6bb17bd3b5fd17eb.tar.bz2
systemd-277ba8d1ab968f4c699c623a6bb17bd3b5fd17eb.zip
network: add support matching based on BSSID=
Diffstat (limited to 'src/libsystemd-network/network-internal.c')
-rw-r--r--src/libsystemd-network/network-internal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index 08c756788e..a8cb4ea286 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -143,10 +143,12 @@ bool net_match_config(Set *match_mac,
char * const *match_names,
char * const *match_property,
char * const *match_ssid,
+ Set *match_bssid,
sd_device *device,
const struct ether_addr *dev_mac,
const char *dev_name,
- const char *ssid) {
+ const char *ssid,
+ const struct ether_addr *bssid) {
const char *dev_path = NULL, *dev_driver = NULL, *dev_type = NULL, *mac_str;
@@ -183,6 +185,9 @@ bool net_match_config(Set *match_mac,
if (!net_condition_test_strv(match_ssid, ssid))
return false;
+ if (match_bssid && (!bssid || !set_contains(match_bssid, bssid)))
+ return false;
+
return true;
}