network: add support matching based on BSSID=

This commit is contained in:
Yu Watanabe
2019-10-15 01:59:56 +09:00
parent 0894cfe41c
commit 277ba8d1ab
10 changed files with 33 additions and 11 deletions
+6 -1
View File
@@ -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;
}
+3 -1
View File
@@ -21,10 +21,12 @@ bool net_match_config(Set *match_mac,
char * const *match_name,
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);
CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
CONFIG_PARSER_PROTOTYPE(config_parse_hwaddr);