network: add support matching based on BSSID=
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user