[PATCH v2 2/2] nl80211: use the process_bss_event for the nl_connect handler
Jouni Malinen
j at w1.fi
Fri Feb 19 17:42:10 EST 2021
On Wed, Feb 17, 2021 at 12:14:33PM +0200, Andrei Otcheretianski wrote:
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> +static int
> +send_and_recv_msgs_connect_handle(struct wpa_driver_nl80211_data *drv,
> + struct nl_msg *msg, struct i802_bss *bss)
> +{
> + struct nl_sock *nl_connect = get_connect_handle(bss);
> +
> + if (nl_connect)
> + return send_and_recv_msgs_owner(drv, msg, nl_connect, 1,
> + process_bss_event, bss, NULL,
> + NULL);
So this has set_owner hardcoded to 1 which matches most modified
callers, but...
> @@ -10519,8 +10524,7 @@ static int wpa_driver_nl80211_leave_mesh(void *priv)
>
> wpa_printf(MSG_DEBUG, "nl80211: mesh leave (ifindex=%d)", drv->ifindex);
> msg = nl80211_drv_msg(drv, 0, NL80211_CMD_LEAVE_MESH);
> - ret = send_and_recv_msgs_owner(drv, msg, get_connect_handle(bss), 0,
> - NULL, NULL, NULL, NULL);
> + ret = send_and_recv_msgs_connect_handle(drv, msg, bss);
This one here uses set_owner == 0.. Is it really correct to replace that
with 1?
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list