[PATCH] hostapd: Return code-17 on max-station limitation.
Ben Greear
greearb
Sat Apr 6 08:54:58 PDT 2013
On 04/05/2013 03:59 PM, greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> I believe this is a more valid response code.
There were a few bugs in this one (passing by value instead
of by address), so I'll post a corrected version soon.
> @@ -132,6 +132,7 @@ static int hostapd_ctrl_iface_new_sta(struct hostapd_data *hapd,
> {
> u8 addr[ETH_ALEN];
> struct sta_info *sta;
> + u16 resp;
>
> wpa_printf(MSG_DEBUG, "CTRL_IFACE NEW_STA %s", txtaddr);
>
> @@ -144,7 +145,7 @@ static int hostapd_ctrl_iface_new_sta(struct hostapd_data *hapd,
>
> wpa_printf(MSG_DEBUG, "Add new STA " MACSTR " based on ctrl_iface "
> "notification", MAC2STR(addr));
> - sta = ap_sta_add(hapd, addr);
> + sta = ap_sta_add(hapd, addr, resp);
> if (sta == NULL)
> return -1;
> @@ -454,11 +454,12 @@ hostapd_wpa_auth_add_sta(void *ctx, const u8 *sta_addr)
> {
> struct hostapd_data *hapd = ctx;
> struct sta_info *sta;
> + u16 resp;
>
> if (hostapd_add_sta_node(hapd, sta_addr, WLAN_AUTH_FT) < 0)
> return NULL;
>
> - sta = ap_sta_add(hapd, sta_addr);
> + sta = ap_sta_add(hapd, sta_addr, resp);
> if (sta == NULL)
> return NULL;
> if (sta->wpa_sm) {
>
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Hostap
mailing list