Message ID | 20200411102527.154154-10-markus.theil@tu-ilmenau.de |
---|---|
State | Accepted |
Headers | show |
Series | nl80211: rx path for control port frames (enabled only for wpa_supplicant) | expand |
On Sat, Apr 11, 2020 at 12:25:25PM +0200, Markus Theil wrote: > Use socket with owner set on deauthenticate from scan. Export helper > method therefore. This type of splitting of patches where one adds a non-static function and another one declares that in a header file is not desired, i.e., both the .c and .h file changes should be in the same patch. Similarly for the function in 6/11, but that actually should be marked static.. I think I'll just merge all these patches 6-9 into a single one (8/11 being the main one). In addition, there does not seem to be any reason for keeping 10/11 separate from 6/11 that introduces the function that is being modified, so that gets into the same single change.
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h index f3513b369..68d089560 100644 --- a/src/drivers/driver_nl80211.h +++ b/src/drivers/driver_nl80211.h @@ -229,6 +229,7 @@ struct nl_msg * nl80211_bss_msg(struct i802_bss *bss, int flags, uint8_t cmd); int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv, struct nl_msg *msg, int (*valid_handler)(struct nl_msg *, void *), void *valid_data); +struct nl_sock* get_connect_or_ctrl_handle(struct i802_bss *bss); int nl80211_create_iface(struct wpa_driver_nl80211_data *drv, const char *ifname, enum nl80211_iftype iftype, const u8 *addr, int wds, diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index 04f6bb879..2e2ba9f56 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -872,7 +872,7 @@ static void clear_state_mismatch(struct wpa_driver_nl80211_data *drv, wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE, WLAN_REASON_PREV_AUTH_NOT_VALID, 1, - NULL); + get_connect_or_ctrl_handle(drv->first_bss)); } }
Use socket with owner set on deauthenticate from scan. Export helper method therefore. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> --- src/drivers/driver_nl80211.h | 1 + src/drivers/driver_nl80211_scan.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)