GAS: Remove unnecessarily duplicate gas_frag_limit configuration
The actual BSS configuration parameter can be updated with the SET control interface command, so there is no need to maintain a separate per-BSS parameter and a separate control interface handling for this. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
678dcebedd
commit
2977f5193a
6 changed files with 15 additions and 19 deletions
|
@ -3298,7 +3298,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||||
if (parse_anqp_elem(bss, pos, line) < 0)
|
if (parse_anqp_elem(bss, pos, line) < 0)
|
||||||
return 1;
|
return 1;
|
||||||
} else if (os_strcmp(buf, "gas_frag_limit") == 0) {
|
} else if (os_strcmp(buf, "gas_frag_limit") == 0) {
|
||||||
bss->gas_frag_limit = atoi(pos);
|
int val = atoi(pos);
|
||||||
|
|
||||||
|
if (val <= 0) {
|
||||||
|
wpa_printf(MSG_ERROR,
|
||||||
|
"Line %d: Invalid gas_frag_limit '%s'",
|
||||||
|
line, pos);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
bss->gas_frag_limit = val;
|
||||||
} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
|
} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
|
||||||
bss->gas_comeback_delay = atoi(pos);
|
bss->gas_comeback_delay = atoi(pos);
|
||||||
} else if (os_strcmp(buf, "qos_map_set") == 0) {
|
} else if (os_strcmp(buf, "qos_map_set") == 0) {
|
||||||
|
|
|
@ -1352,14 +1352,6 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
|
||||||
wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d",
|
wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d",
|
||||||
wps_corrupt_pkhash);
|
wps_corrupt_pkhash);
|
||||||
#endif /* CONFIG_WPS_TESTING */
|
#endif /* CONFIG_WPS_TESTING */
|
||||||
#ifdef CONFIG_INTERWORKING
|
|
||||||
} else if (os_strcasecmp(cmd, "gas_frag_limit") == 0) {
|
|
||||||
int val = atoi(value);
|
|
||||||
if (val <= 0)
|
|
||||||
ret = -1;
|
|
||||||
else
|
|
||||||
hapd->gas_frag_limit = val;
|
|
||||||
#endif /* CONFIG_INTERWORKING */
|
|
||||||
#ifdef CONFIG_TESTING_OPTIONS
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
} else if (os_strcasecmp(cmd, "ext_mgmt_frame_handling") == 0) {
|
} else if (os_strcasecmp(cmd, "ext_mgmt_frame_handling") == 0) {
|
||||||
hapd->ext_mgmt_frame_handling = atoi(value);
|
hapd->ext_mgmt_frame_handling = atoi(value);
|
||||||
|
|
|
@ -96,6 +96,8 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
|
||||||
|
|
||||||
bss->sae_anti_clogging_threshold = 5;
|
bss->sae_anti_clogging_threshold = 5;
|
||||||
|
|
||||||
|
bss->gas_frag_limit = 1400;
|
||||||
|
|
||||||
#ifdef CONFIG_FILS
|
#ifdef CONFIG_FILS
|
||||||
dl_list_init(&bss->fils_realms);
|
dl_list_init(&bss->fils_realms);
|
||||||
#endif /* CONFIG_FILS */
|
#endif /* CONFIG_FILS */
|
||||||
|
|
|
@ -515,7 +515,7 @@ struct hostapd_bss_config {
|
||||||
struct dl_list anqp_elem; /* list of struct anqp_element */
|
struct dl_list anqp_elem; /* list of struct anqp_element */
|
||||||
|
|
||||||
u16 gas_comeback_delay;
|
u16 gas_comeback_delay;
|
||||||
int gas_frag_limit;
|
size_t gas_frag_limit;
|
||||||
int gas_address3;
|
int gas_address3;
|
||||||
|
|
||||||
u8 qos_map_set[16 + 2 * 21];
|
u8 qos_map_set[16 + 2 * 21];
|
||||||
|
|
|
@ -1245,7 +1245,7 @@ static void gas_serv_req_local_processing(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
if (wpabuf_len(buf) > hapd->gas_frag_limit ||
|
if (wpabuf_len(buf) > hapd->conf->gas_frag_limit ||
|
||||||
hapd->conf->gas_comeback_delay) {
|
hapd->conf->gas_comeback_delay) {
|
||||||
struct gas_dialog_info *di;
|
struct gas_dialog_info *di;
|
||||||
u16 comeback_delay = 1;
|
u16 comeback_delay = 1;
|
||||||
|
@ -1449,8 +1449,8 @@ static void gas_serv_rx_gas_comeback_req(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
|
|
||||||
frag_len = wpabuf_len(dialog->sd_resp) - dialog->sd_resp_pos;
|
frag_len = wpabuf_len(dialog->sd_resp) - dialog->sd_resp_pos;
|
||||||
if (frag_len > hapd->gas_frag_limit) {
|
if (frag_len > hapd->conf->gas_frag_limit) {
|
||||||
frag_len = hapd->gas_frag_limit;
|
frag_len = hapd->conf->gas_frag_limit;
|
||||||
more = 1;
|
more = 1;
|
||||||
}
|
}
|
||||||
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "GAS: resp frag_len %u",
|
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "GAS: resp frag_len %u",
|
||||||
|
@ -1551,9 +1551,6 @@ int gas_serv_init(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
hapd->public_action_cb2 = gas_serv_rx_public_action;
|
hapd->public_action_cb2 = gas_serv_rx_public_action;
|
||||||
hapd->public_action_cb2_ctx = hapd;
|
hapd->public_action_cb2_ctx = hapd;
|
||||||
hapd->gas_frag_limit = 1400;
|
|
||||||
if (hapd->conf->gas_frag_limit > 0)
|
|
||||||
hapd->gas_frag_limit = hapd->conf->gas_frag_limit;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,9 +260,6 @@ struct hostapd_data {
|
||||||
int noa_start;
|
int noa_start;
|
||||||
int noa_duration;
|
int noa_duration;
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
#ifdef CONFIG_INTERWORKING
|
|
||||||
size_t gas_frag_limit;
|
|
||||||
#endif /* CONFIG_INTERWORKING */
|
|
||||||
#ifdef CONFIG_PROXYARP
|
#ifdef CONFIG_PROXYARP
|
||||||
struct l2_packet_data *sock_dhcp;
|
struct l2_packet_data *sock_dhcp;
|
||||||
struct l2_packet_data *sock_ndisc;
|
struct l2_packet_data *sock_ndisc;
|
||||||
|
|
Loading…
Reference in a new issue