DPP3: Default value for dpp_connector_privacy

The new global configuration parameter
dpp_connector_privacy_default=<0/1> can now be used to set the default
value for the dpp_connector_privacy parameter for all new networks
provisioned using DPP.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-07-18 23:57:22 +03:00 committed by Jouni Malinen
parent 7d12871ba0
commit 479e412a67
4 changed files with 14 additions and 0 deletions

View file

@ -5306,6 +5306,7 @@ static const struct global_parse_data global_fields[] = {
{ STR(dpp_mud_url), 0 },
{ STR(dpp_extra_conf_req_name), 0 },
{ STR(dpp_extra_conf_req_value), 0 },
{ INT_RANGE(dpp_connector_privacy_default, 0, 1), 0 },
#endif /* CONFIG_DPP */
{ INT_RANGE(coloc_intf_reporting, 0, 1), 0 },
#ifdef CONFIG_WNM

View file

@ -1629,6 +1629,13 @@ struct wpa_config {
*/
char *dpp_extra_conf_req_value;
/* dpp_connector_privacy_default - Default valur for Connector privacy
*
* This value is used as the default for the dpp_connector_privacy
* network parameter for all new networks provisioned using DPP.
*/
int dpp_connector_privacy_default;
/**
* coloc_intf_reporting - Colocated interference reporting
*

View file

@ -1554,6 +1554,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
if (config->dpp_extra_conf_req_value)
fprintf(f, "dpp_extra_conf_req_value=%s\n",
config->dpp_extra_conf_req_value);
if (config->dpp_connector_privacy_default)
fprintf(f, "dpp_connector_privacy_default=%d\n",
config->dpp_connector_privacy_default);
if (config->coloc_intf_reporting)
fprintf(f, "coloc_intf_reporting=%d\n",
config->coloc_intf_reporting);

View file

@ -1277,6 +1277,9 @@ static struct wpa_ssid * wpas_dpp_add_network(struct wpa_supplicant *wpa_s,
ssid->dpp_connector = os_strdup(conf->connector);
if (!ssid->dpp_connector)
goto fail;
ssid->dpp_connector_privacy =
wpa_s->conf->dpp_connector_privacy_default;
}
if (conf->c_sign_key) {