Lines Matching +full:addr +full:- +full:mode
3 * Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi>
36 ret = os_snprintf(buf + len, buflen - len,
38 if (os_snprintf_error(buflen - len, ret))
43 len += wpa_snprintf_hex(buf + len, buflen - len, mcs_set, 10);
45 ret = os_snprintf(buf + len, buflen - len, "\n");
46 if (os_snprintf_error(buflen - len, ret))
62 if (sta->connected_time.sec) {
63 /* Locally maintained time in AP mode */
64 os_reltime_age(&sta->connected_time, &age);
66 } else if (data->flags & STA_DRV_DATA_CONN_TIME) {
67 /* Time from the driver in mesh mode */
68 secs = data->connected_sec;
88 if (hostapd_drv_read_sta_data(hapd, &data, sta->addr) < 0)
101 ret = os_snprintf(buf + len, buflen - len, "rx_rate_info=%lu",
103 if (os_snprintf_error(buflen - len, ret))
107 ret = os_snprintf(buf + len, buflen - len, " mcs %u",
109 if (!os_snprintf_error(buflen - len, ret))
113 ret = os_snprintf(buf + len, buflen - len, " vhtmcs %u",
115 if (!os_snprintf_error(buflen - len, ret))
119 ret = os_snprintf(buf + len, buflen - len, " vhtnss %u",
121 if (!os_snprintf_error(buflen - len, ret))
125 ret = os_snprintf(buf + len, buflen - len, " shortGI");
126 if (!os_snprintf_error(buflen - len, ret))
129 ret = os_snprintf(buf + len, buflen - len, "\n");
130 if (!os_snprintf_error(buflen - len, ret))
133 ret = os_snprintf(buf + len, buflen - len, "tx_rate_info=%lu",
135 if (os_snprintf_error(buflen - len, ret))
139 ret = os_snprintf(buf + len, buflen - len, " mcs %u",
141 if (!os_snprintf_error(buflen - len, ret))
145 ret = os_snprintf(buf + len, buflen - len, " vhtmcs %u",
147 if (!os_snprintf_error(buflen - len, ret))
151 ret = os_snprintf(buf + len, buflen - len, " vhtnss %u",
153 if (!os_snprintf_error(buflen - len, ret))
157 ret = os_snprintf(buf + len, buflen - len, " shortGI");
158 if (!os_snprintf_error(buflen - len, ret))
161 ret = os_snprintf(buf + len, buflen - len, "\n");
162 if (!os_snprintf_error(buflen - len, ret))
165 if ((sta->flags & WLAN_STA_VHT) && sta->vht_capabilities) {
166 ret = os_snprintf(buf + len, buflen - len,
169 le_to_host16(sta->vht_capabilities->
171 le_to_host16(sta->vht_capabilities->
173 if (!os_snprintf_error(buflen - len, ret))
177 if ((sta->flags & WLAN_STA_HT) && sta->ht_capabilities) {
179 sta->ht_capabilities->
184 ret = os_snprintf(buf + len, buflen - len,
186 if (!os_snprintf_error(buflen - len, ret))
190 len += hostapd_get_sta_conn_time(sta, &data, buf + len, buflen - len);
215 static const char * hw_mode_str(enum hostapd_hw_mode mode)
217 switch (mode) {
247 ret = os_snprintf(buf + len, buflen - len, MACSTR "\nflags=",
248 MAC2STR(sta->addr));
249 if (os_snprintf_error(buflen - len, ret))
253 ret = ap_sta_flags_txt(sta->flags, buf + len, buflen - len);
258 ret = os_snprintf(buf + len, buflen - len, "\naid=%d\ncapability=0x%x\n"
260 sta->aid, sta->capability, sta->listen_interval);
261 if (os_snprintf_error(buflen - len, ret))
265 for (i = 0; i < sta->supported_rates_len; i++) {
266 ret = os_snprintf(buf + len, buflen - len, "%02x%s",
267 sta->supported_rates[i],
268 i + 1 < sta->supported_rates_len ? " " : "");
269 if (os_snprintf_error(buflen - len, ret))
274 ret = os_snprintf(buf + len, buflen - len, "\ntimeout_next=%s\n",
275 timeout_next_str(sta->timeout_next));
276 if (os_snprintf_error(buflen - len, ret))
280 if (sta->max_idle_period) {
281 ret = os_snprintf(buf + len, buflen - len,
282 "max_idle_period=%d\n", sta->max_idle_period);
283 if (os_snprintf_error(buflen - len, ret))
288 res = ieee802_11_get_mib_sta(hapd, sta, buf + len, buflen - len);
291 res = wpa_get_mib_sta(sta->wpa_sm, buf + len, buflen - len);
294 res = ieee802_1x_get_mib_sta(hapd, sta, buf + len, buflen - len);
297 res = hostapd_wps_get_mib_sta(hapd, sta->addr, buf + len,
298 buflen - len);
301 res = hostapd_p2p_get_mib_sta(hapd, sta, buf + len, buflen - len);
305 len += hostapd_get_sta_info(hapd, sta, buf + len, buflen - len);
308 if (sta->sae && sta->sae->state == SAE_ACCEPTED) {
309 res = os_snprintf(buf + len, buflen - len, "sae_group=%d\n",
310 sta->sae->group);
311 if (!os_snprintf_error(buflen - len, res))
315 if (sta->sae && sta->sae->tmp) {
318 struct wpabuf *groups = sta->sae->tmp->peer_rejected_groups;
320 res = os_snprintf(buf + len, buflen - len,
322 if (!os_snprintf_error(buflen - len, res))
333 res = os_snprintf(buf + len, buflen - len, "%s%d",
335 if (!os_snprintf_error(buflen - len, res))
340 res = os_snprintf(buf + len, buflen - len, "\n");
341 if (!os_snprintf_error(buflen - len, res))
346 if (sta->vlan_id > 0) {
347 res = os_snprintf(buf + len, buflen - len, "vlan_id=%d\n",
348 sta->vlan_id);
349 if (!os_snprintf_error(buflen - len, res))
353 res = mbo_ap_get_info(sta, buf + len, buflen - len);
357 if (sta->supp_op_classes &&
358 buflen - len > (unsigned) (17 + 2 * sta->supp_op_classes[0])) {
359 res = os_snprintf(buf + len, buflen - len, "supp_op_classes=");
360 if (!os_snprintf_error(buflen - len, res))
362 len += wpa_snprintf_hex(buf + len, buflen - len,
363 sta->supp_op_classes + 1,
364 sta->supp_op_classes[0]);
365 res = os_snprintf(buf + len, buflen - len, "\n");
366 if (!os_snprintf_error(buflen - len, res))
370 if (sta->power_capab) {
371 ret = os_snprintf(buf + len, buflen - len,
374 sta->min_tx_power, sta->max_tx_power);
375 if (!os_snprintf_error(buflen - len, ret))
380 if ((sta->flags & WLAN_STA_HE) && sta->he_capab) {
381 res = os_snprintf(buf + len, buflen - len, "he_capab=");
382 if (!os_snprintf_error(buflen - len, res))
384 len += wpa_snprintf_hex(buf + len, buflen - len,
385 (const u8 *) sta->he_capab,
386 sta->he_capab_len);
387 res = os_snprintf(buf + len, buflen - len, "\n");
388 if (!os_snprintf_error(buflen - len, res))
394 if ((sta->flags & WLAN_STA_EHT) && sta->eht_capab) {
395 res = os_snprintf(buf + len, buflen - len, "eht_capab=");
396 if (!os_snprintf_error(buflen - len, res))
398 len += wpa_snprintf_hex(buf + len, buflen - len,
399 (const u8 *) sta->eht_capab,
400 sta->eht_capab_len);
401 res = os_snprintf(buf + len, buflen - len, "\n");
402 if (!os_snprintf_error(buflen - len, res))
408 if ((sta->flags & WLAN_STA_VHT) && sta->vht_capabilities) {
409 res = os_snprintf(buf + len, buflen - len,
411 le_to_host32(sta->vht_capabilities->
413 if (!os_snprintf_error(buflen - len, res))
416 res = os_snprintf(buf + len, buflen - len, "vht_capab=");
417 if (!os_snprintf_error(buflen - len, res))
419 len += wpa_snprintf_hex(buf + len, buflen - len,
420 (const u8 *) sta->vht_capabilities,
421 sizeof(*sta->vht_capabilities));
422 res = os_snprintf(buf + len, buflen - len, "\n");
423 if (!os_snprintf_error(buflen - len, res))
428 if ((sta->flags & WLAN_STA_HT) && sta->ht_capabilities) {
429 res = os_snprintf(buf + len, buflen - len,
431 le_to_host16(sta->ht_capabilities->
433 if (!os_snprintf_error(buflen - len, res))
437 if (sta->ext_capability &&
438 buflen - len > (unsigned) (11 + 2 * sta->ext_capability[0])) {
439 res = os_snprintf(buf + len, buflen - len, "ext_capab=");
440 if (!os_snprintf_error(buflen - len, res))
442 len += wpa_snprintf_hex(buf + len, buflen - len,
443 sta->ext_capability + 1,
444 sta->ext_capability[0]);
445 res = os_snprintf(buf + len, buflen - len, "\n");
446 if (!os_snprintf_error(buflen - len, res))
450 if (sta->flags & WLAN_STA_WDS && sta->ifname_wds) {
451 ret = os_snprintf(buf + len, buflen - len,
452 "wds_sta_ifname=%s\n", sta->ifname_wds);
453 if (!os_snprintf_error(buflen - len, ret))
459 ret = os_snprintf(buf + len, buflen - len, "keyid=%s\n", keyid);
460 if (!os_snprintf_error(buflen - len, ret))
466 ret = os_snprintf(buf + len, buflen - len, "dpp_pkhash=");
467 if (!os_snprintf_error(buflen - len, ret))
469 len += wpa_snprintf_hex(buf + len, buflen - len, dpp_pkhash,
471 ret = os_snprintf(buf + len, buflen - len, "\n");
472 if (!os_snprintf_error(buflen - len, ret))
477 if (sta->mld_info.mld_sta) {
479 if (!sta->mld_info.links[i].valid)
482 buf + len, buflen - len,
484 i, MAC2STR(sta->mld_info.links[i].peer_addr));
485 if (!os_snprintf_error(buflen - len, ret))
498 return hostapd_ctrl_iface_sta_mib(hapd, hapd->sta_list, buf, buflen);
505 u8 addr[ETH_ALEN];
510 if (hwaddr_aton(txtaddr, addr)) {
517 sta = ap_get_sta(hapd, addr);
519 return -1;
527 if (sta->eapol_sm == NULL)
528 return -1;
529 return eapol_auth_dump_state(sta->eapol_sm, buf,
534 return -1;
538 ret += fst_ctrl_iface_mb_info(addr, buf + ret, buflen - ret);
547 u8 addr[ETH_ALEN];
551 if (hwaddr_aton(txtaddr, addr) ||
552 (sta = ap_get_sta(hapd, addr)) == NULL) {
559 if (!sta->next)
562 return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
568 u8 minor_reason_code, const u8 *addr)
576 return -1;
578 mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, stype);
579 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "P2P: Disconnect STA " MACSTR
581 MAC2STR(addr), minor_reason_code, stype,
582 fc2str(le_to_host16(mgmt->frame_control)));
584 os_memcpy(mgmt->da, addr, ETH_ALEN);
585 os_memcpy(mgmt->sa, hapd->own_addr, ETH_ALEN);
586 os_memcpy(mgmt->bssid, hapd->own_addr, ETH_ALEN);
588 mgmt->u.deauth.reason_code =
590 pos = mgmt->u.deauth.variable;
592 mgmt->u.disassoc.reason_code =
594 pos = mgmt->u.disassoc.variable;
607 ret = hostapd_drv_send_mlme(hapd, mgmt, pos - (u8 *) mgmt, 0, NULL, 0,
611 return ret < 0 ? -1 : 0;
619 u8 addr[ETH_ALEN];
624 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE DEAUTHENTICATE %s",
627 if (hwaddr_aton(txtaddr, addr))
628 return -1;
644 os_memcpy(mgmt.da, addr, ETH_ALEN);
645 os_memcpy(mgmt.sa, hapd->own_addr, ETH_ALEN);
646 os_memcpy(mgmt.bssid, hapd->own_addr, ETH_ALEN);
652 return -1;
660 atoi(pos + 5), addr);
665 hostapd_drv_sta_remove(hapd, addr);
667 hostapd_drv_sta_deauth(hapd, addr, reason);
668 sta = ap_get_sta(hapd, addr);
671 else if (addr[0] == 0xff)
681 u8 addr[ETH_ALEN];
686 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE DISASSOCIATE %s",
689 if (hwaddr_aton(txtaddr, addr))
690 return -1;
706 os_memcpy(mgmt.da, addr, ETH_ALEN);
707 os_memcpy(mgmt.sa, hapd->own_addr, ETH_ALEN);
708 os_memcpy(mgmt.bssid, hapd->own_addr, ETH_ALEN);
714 return -1;
722 atoi(pos + 5), addr);
727 hostapd_drv_sta_remove(hapd, addr);
729 hostapd_drv_sta_disassoc(hapd, addr, reason);
730 sta = ap_get_sta(hapd, addr);
733 else if (addr[0] == 0xff)
745 u8 addr[ETH_ALEN];
748 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE SIGNATURE %s", txtaddr);
750 if (hwaddr_aton(txtaddr, addr))
751 return -1;
753 sta = ap_get_sta(hapd, addr);
755 return -1;
765 u8 addr[ETH_ALEN];
768 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE POLL_STA %s", txtaddr);
770 if (hwaddr_aton(txtaddr, addr))
771 return -1;
773 sta = ap_get_sta(hapd, addr);
775 return -1;
777 hostapd_drv_poll_client(hapd, hapd->own_addr, addr,
778 sta->flags & WLAN_STA_WMM);
786 struct hostapd_iface *iface = hapd->iface;
787 struct hostapd_hw_modes *mode = iface->current_mode;
788 struct hostapd_config *iconf = hapd->iconf;
792 ret = os_snprintf(buf + len, buflen - len,
806 hostapd_state_text(iface->state),
807 iface->phy,
808 iface->freq,
809 iface->num_sta_non_erp,
810 iface->num_sta_no_short_slot_time,
811 iface->num_sta_no_short_preamble,
812 iface->olbc,
813 iface->num_sta_ht_no_gf,
814 iface->num_sta_no_ht,
815 iface->num_sta_ht_20mhz,
816 iface->num_sta_ht40_intolerant,
817 iface->olbc_ht,
818 iface->ht_op_mode);
819 if (os_snprintf_error(buflen - len, ret))
823 if (mode) {
824 ret = os_snprintf(buf + len, buflen - len, "hw_mode=%s\n",
825 hw_mode_str(mode->mode));
826 if (os_snprintf_error(buflen - len, ret))
831 if (iconf->country[0] && iconf->country[1]) {
832 ret = os_snprintf(buf + len, buflen - len,
834 iconf->country[0], iconf->country[1],
835 iconf->country[2]);
836 if (os_snprintf_error(buflen - len, ret))
841 if (!iface->cac_started || !iface->dfs_cac_ms) {
842 ret = os_snprintf(buf + len, buflen - len,
845 iface->dfs_cac_ms / 1000);
847 /* CAC started and CAC time set - calculate remaining time */
851 os_reltime_age(&iface->dfs_cac_start, &now);
852 left_time = (long) iface->dfs_cac_ms / 1000 - now.sec;
853 ret = os_snprintf(buf + len, buflen - len,
856 iface->dfs_cac_ms / 1000,
859 if (os_snprintf_error(buflen - len, ret))
863 ret = os_snprintf(buf + len, buflen - len,
874 iface->conf->channel,
875 iface->conf->enable_edmg,
876 iface->conf->edmg_channel,
877 iface->conf->ieee80211n && !hapd->conf->disable_11n ?
878 iface->conf->secondary_channel : 0,
879 iface->conf->ieee80211n && !hapd->conf->disable_11n,
880 iface->conf->ieee80211ac &&
881 !hapd->conf->disable_11ac,
882 iface->conf->ieee80211ax &&
883 !hapd->conf->disable_11ax,
884 iface->conf->ieee80211be &&
885 !hapd->conf->disable_11be,
886 iface->conf->beacon_int,
887 hapd->conf->dtim_period);
888 if (os_snprintf_error(buflen - len, ret))
893 if (iface->conf->ieee80211be && !hapd->conf->disable_11be) {
894 ret = os_snprintf(buf + len, buflen - len,
897 iface->conf->eht_oper_chwidth,
898 iface->conf->eht_oper_centr_freq_seg0_idx);
899 if (os_snprintf_error(buflen - len, ret))
903 if (is_6ghz_op_class(iface->conf->op_class) &&
904 hostapd_get_oper_chwidth(iface->conf) ==
906 ret = os_snprintf(buf + len, buflen - len,
908 iface->conf->eht_bw320_offset);
909 if (os_snprintf_error(buflen - len, ret))
914 if (hapd->conf->mld_ap) {
917 ret = os_snprintf(buf + len, buflen - len,
919 hapd->mld->num_links);
920 if (os_snprintf_error(buflen - len, ret))
925 ret = os_snprintf(buf + len, buflen - len,
928 hapd->mld_link_id,
929 MAC2STR(hapd->own_addr));
930 if (os_snprintf_error(buflen - len, ret))
939 ret = os_snprintf(buf + len, buflen - len,
942 link_bss->mld_link_id,
943 MAC2STR(link_bss->own_addr));
944 if (os_snprintf_error(buflen - len, ret))
953 if (iface->conf->ieee80211ax && !hapd->conf->disable_11ax) {
954 ret = os_snprintf(buf + len, buflen - len,
958 iface->conf->he_oper_chwidth,
959 iface->conf->he_oper_centr_freq_seg0_idx,
960 iface->conf->he_oper_centr_freq_seg1_idx);
961 if (os_snprintf_error(buflen - len, ret))
965 if (!iconf->he_op.he_bss_color_disabled &&
966 iconf->he_op.he_bss_color) {
967 ret = os_snprintf(buf + len, buflen - len,
969 iconf->he_op.he_bss_color);
970 if (os_snprintf_error(buflen - len, ret))
977 if (iface->conf->ieee80211ac && !hapd->conf->disable_11ac) {
978 ret = os_snprintf(buf + len, buflen - len,
983 iface->conf->vht_oper_chwidth,
984 iface->conf->vht_oper_centr_freq_seg0_idx,
985 iface->conf->vht_oper_centr_freq_seg1_idx,
986 iface->conf->vht_capab);
987 if (os_snprintf_error(buflen - len, ret))
992 if (iface->conf->ieee80211ac && !hapd->conf->disable_11ac && mode) {
993 u16 rxmap = WPA_GET_LE16(&mode->vht_mcs_set[0]);
994 u16 txmap = WPA_GET_LE16(&mode->vht_mcs_set[4]);
996 ret = os_snprintf(buf + len, buflen - len,
1000 if (os_snprintf_error(buflen - len, ret))
1005 if (iface->conf->ieee80211n && !hapd->conf->disable_11n) {
1006 ret = os_snprintf(buf + len, buflen - len,
1008 hapd->iconf->ht_capab);
1009 if (os_snprintf_error(buflen - len, ret))
1014 if (iface->conf->ieee80211n && !hapd->conf->disable_11n && mode) {
1016 mode->mcs_set);
1019 if (iface->current_rates && iface->num_rates) {
1020 ret = os_snprintf(buf + len, buflen - len, "supported_rates=");
1021 if (os_snprintf_error(buflen - len, ret))
1025 for (j = 0; j < iface->num_rates; j++) {
1026 ret = os_snprintf(buf + len, buflen - len, "%s%02x",
1028 iface->current_rates[j].rate / 5);
1029 if (os_snprintf_error(buflen - len, ret))
1033 ret = os_snprintf(buf + len, buflen - len, "\n");
1034 if (os_snprintf_error(buflen - len, ret))
1039 for (j = 0; mode && j < mode->num_channels; j++) {
1040 if (mode->channels[j].freq == iface->freq) {
1041 ret = os_snprintf(buf + len, buflen - len,
1043 mode->channels[j].max_tx_power);
1044 if (os_snprintf_error(buflen - len, ret))
1051 for (i = 0; i < iface->num_bss; i++) {
1052 struct hostapd_data *bss = iface->bss[i];
1053 ret = os_snprintf(buf + len, buflen - len,
1058 (int) i, bss->conf->iface,
1059 (int) i, MAC2STR(bss->own_addr),
1061 wpa_ssid_txt(bss->conf->ssid.ssid,
1062 bss->conf->ssid.ssid_len),
1063 (int) i, bss->num_sta);
1064 if (os_snprintf_error(buflen - len, ret))
1069 if (bss->conf->mld_ap) {
1070 ret = os_snprintf(buf + len, buflen - len,
1074 (int) i, MAC2STR(bss->mld->mld_addr),
1076 (int) i, bss->mld_link_id);
1077 if (os_snprintf_error(buflen - len, ret))
1084 if (hapd->conf->chan_util_avg_period) {
1085 ret = os_snprintf(buf + len, buflen - len,
1087 iface->chan_util_average);
1088 if (os_snprintf_error(buflen - len, ret))
1103 settings->cs_count = strtol(pos, &end, 10);
1106 return -1;
1109 settings->freq_params.freq = atoi(end);
1110 if (settings->freq_params.freq == 0) {
1112 return -1;
1119 pos2 += sizeof(" " #str "=") - 1; \
1120 settings->freq_params.str = atoi(pos2); \
1128 pos2 += sizeof(" " #str "=") - 1; \
1129 settings->str = atoi(pos2); \
1138 settings->freq_params.ht_enabled = !!os_strstr(pos, " ht");
1139 settings->freq_params.vht_enabled = !!os_strstr(pos, " vht");
1140 settings->freq_params.he_enabled = !!os_strstr(pos, " he");
1141 settings->freq_params.eht_enabled = !!os_strstr(pos, " eht");
1142 settings->block_tx = !!os_strstr(pos, " blocktx");
1159 return wpa_auth_pmksa_list(hapd->wpa_auth, buf, len);
1165 wpa_auth_pmksa_flush(hapd->wpa_auth);
1180 * <STA addr> <PMKID> <PMK> <expiration in seconds> <akmp>
1184 return -1;
1188 return -1;
1192 return -1;
1196 return -1;
1201 return -1;
1202 pmk_len = (pos2 - pos) / 2;
1205 return -1;
1210 return -1;
1212 return wpa_auth_pmksa_add2(hapd->wpa_auth, spa, pmk, pmk_len,
1221 const u8 *addr, char *buf, size_t len)
1223 return wpa_auth_pmksa_list_mesh(hapd->wpa_auth, addr, buf, len);
1280 u8 addr[ETH_ALEN];
1284 if (hwaddr_aton(cmd, addr))
1285 return -1;
1287 return -1;
1290 sta = ap_get_sta(hapd, addr);
1294 MAC2STR(addr));
1295 return -1;
1305 u8 addr[ETH_ALEN];
1310 if (hwaddr_aton(cmd, addr))
1311 return -1;
1313 sta = ap_get_sta(hapd, addr);
1317 MAC2STR(addr));
1318 return -1;
1323 return -1;
1327 return -1;
1331 return -1;
1341 u8 addr[ETH_ALEN];
1354 if (hwaddr_aton(cmd, addr)) {
1356 return -1;
1359 sta = ap_get_sta(hapd, addr);
1363 MAC2STR(addr));
1364 return -1;
1373 return -1;
1400 return -1;
1409 return -1;
1417 len = end - pos;
1422 return -1;
1448 ret = -1;
1456 ret = -1;
1465 ret = -1;
1473 "MBO: Assoc retry delay is only valid in disassoc imminent mode");
1474 ret = -1;
1492 mbo_len = mbo_pos - mbo;
1513 u8 addr[ETH_ALEN];
1519 if (hwaddr_aton(txtaddr, addr))
1520 return -1;
1522 if (hostapd_maclist_found(*acl, *num, addr, &vlan_id))
1523 hostapd_remove_acl_mac(acl, num, addr);
1533 hostapd_remove_acl_mac(acl, num, (*acl)[0].addr);
1546 ret = os_snprintf(buf + len, buflen - len,
1548 MAC2STR(acl[i].addr),
1550 if (ret < 0 || (size_t) ret >= buflen - len)
1562 u8 addr[ETH_ALEN];
1567 if (hwaddr_aton(cmd, addr))
1568 return -1;
1574 if (!hostapd_maclist_found(*acl, *num, addr, &vlan_id)) {
1575 ret = hostapd_add_acl_maclist(acl, num, vlanid, addr);
1576 if (ret != -1 && *acl)
1580 return ret < 0 ? -1 : 0;
1589 if (hapd->conf->macaddr_acl != DENY_UNLESS_ACCEPTED)
1592 for (sta = hapd->sta_list; sta; sta = sta->next) {
1593 if (!hostapd_maclist_found(hapd->conf->accept_mac,
1594 hapd->conf->num_accept_mac,
1595 sta->addr, &vlan_id) ||
1597 vlan_compare(&vlan_id, sta->vlan_desc)))
1598 ap_sta_disconnect(hapd, sta, sta->addr,
1611 for (sta = hapd->sta_list; sta; sta = sta->next) {
1612 if (hostapd_maclist_found(hapd->conf->deny_mac,
1613 hapd->conf->num_deny_mac, sta->addr,
1616 !vlan_compare(&vlan_id, sta->vlan_desc)))
1617 ap_sta_disconnect(hapd, sta, sta->addr,