1 --- a/hostapd/config_file.c
2 +++ b/hostapd/config_file.c
3 @@ -1266,6 +1266,8 @@ struct hostapd_config * hostapd_config_r
5 } else if (os_strcmp(buf, "wds_sta") == 0) {
6 bss->wds_sta = atoi(pos);
7 + } else if (os_strcmp(buf, "ap_isolate") == 0) {
8 + bss->isolate = atoi(pos);
9 } else if (os_strcmp(buf, "ap_max_inactivity") == 0) {
10 bss->ap_max_inactivity = atoi(pos);
11 } else if (os_strcmp(buf, "country_code") == 0) {
12 --- a/src/ap/ap_config.h
13 +++ b/src/ap/ap_config.h
14 @@ -199,6 +199,7 @@ struct hostapd_bss_config {
15 struct mac_acl_entry *deny_mac;
20 int auth_algs; /* bitfield of allowed IEEE 802.11 authentication
21 * algorithms, WPA_AUTH_ALG_{OPEN,SHARED,LEAP} */
22 --- a/src/drivers/driver.h
23 +++ b/src/drivers/driver.h
24 @@ -1626,6 +1626,14 @@ struct wpa_driver_ops {
25 const char *bridge_ifname);
28 + * set_ap_isolate - Enable/disable AP isolation
29 + * @priv: private driver interface data
30 + * @val: 1 = enabled; 0 = disabled
31 + * Returns: 0 on success, -1 on failure
33 + int (*set_ap_isolate)(void *priv, int val);
36 * send_action - Transmit an Action frame
37 * @priv: Private driver interface data
38 * @freq: Frequency (in MHz) of the channel
39 --- a/src/drivers/driver_nl80211.c
40 +++ b/src/drivers/driver_nl80211.c
41 @@ -4263,6 +4263,29 @@ static int i802_set_rate_sets(void *priv
45 +static int i802_set_ap_isolate(void *priv, int val)
47 + struct i802_bss *bss = priv;
48 + struct wpa_driver_nl80211_data *drv = bss->drv;
52 + msg = nlmsg_alloc();
56 + genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
57 + NL80211_CMD_SET_BSS, 0);
59 + NLA_PUT_U8(msg, NL80211_ATTR_AP_ISOLATE, !!val);
61 + NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
63 + return send_and_recv_msgs(drv, msg, NULL, NULL);
71 @@ -5372,6 +5395,7 @@ const struct wpa_driver_ops wpa_driver_n
72 .set_tx_queue_params = i802_set_tx_queue_params,
73 .set_sta_vlan = i802_set_sta_vlan,
74 .set_wds_sta = i802_set_wds_sta,
75 + .set_ap_isolate = i802_set_ap_isolate,
77 .set_freq = i802_set_freq,
78 .send_action = wpa_driver_nl80211_send_action,
79 --- a/src/ap/ap_drv_ops.c
80 +++ b/src/ap/ap_drv_ops.c
81 @@ -180,6 +180,14 @@ static int hostapd_set_radius_acl_expire
85 +static int hostapd_set_ap_isolate(struct hostapd_data *hapd, int value)
87 + if (hapd->driver == NULL || hapd->driver->set_ap_isolate == NULL)
89 + hapd->driver->set_ap_isolate(hapd->drv_priv, value);
93 static int hostapd_set_bss_params(struct hostapd_data *hapd,
96 @@ -229,6 +237,12 @@ static int hostapd_set_bss_params(struct
100 + if (hostapd_set_ap_isolate(hapd, hapd->conf->isolate) &&
101 + !hapd->conf->isolate) {
102 + wpa_printf(MSG_ERROR, "Could not enable AP isolation in "