diff mbox series

[v2,11/11] nl80211: disable ctrl port over nl80211 for ap mode

Message ID 20200411102527.154154-12-markus.theil@tu-ilmenau.de
State Superseded
Headers show
Series nl80211: rx path for control port frames (enabled only for wpa_supplicant) | expand

Commit Message

Markus Theil April 11, 2020, 10:25 a.m. UTC
AP mode under Linux currently checks the tx status of control port frames
over auxiliary socket data. As this is currently not possible for control
port over nl80211, disable AP mode over nl80211 control port for now.

Code for AP mode is working besides this missing fast retransmit feature.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 src/drivers/driver_nl80211.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jouni Malinen April 18, 2020, 5:57 p.m. UTC | #1
On Sat, Apr 11, 2020 at 12:25:27PM +0200, Markus Theil wrote:
> AP mode under Linux currently checks the tx status of control port frames
> over auxiliary socket data. As this is currently not possible for control
> port over nl80211, disable AP mode over nl80211 control port for now.
> 
> Code for AP mode is working besides this missing fast retransmit feature.

Hmm.. We have already enabled EAPOL TX over control port in hostapd for
TX..

> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> @@ -463,6 +463,7 @@ int send_and_recv_msgs_as_owner(struct wpa_driver_nl80211_data *drv,
>  	 * has the connection owner property set in the kernel.
>  	 */
>  	if (drv->capa.flags & WPA_DRIVER_FLAGS_CONTROL_PORT &&
> +	    !(drv->hostapd || drv->start_mode_ap) &&
>  	    handle && set_owner)
>  		if (nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_OVER_NL80211) ||
>  		    nla_put_flag(msg, NL80211_ATTR_SOCKET_OWNER) ||

And isn't this disabling this for RX, not TX?

Is there a reason to disable this for RX in AP mode? The commit message
is describing missing capability for TX, not RX..
Markus Theil April 18, 2020, 7:10 p.m. UTC | #2
On 4/18/20 7:57 PM, Jouni Malinen wrote:
> On Sat, Apr 11, 2020 at 12:25:27PM +0200, Markus Theil wrote:
>> AP mode under Linux currently checks the tx status of control port frames
>> over auxiliary socket data. As this is currently not possible for control
>> port over nl80211, disable AP mode over nl80211 control port for now.
>>
>> Code for AP mode is working besides this missing fast retransmit feature.
> Hmm.. We have already enabled EAPOL TX over control port in hostapd for
> TX..
I know, unfortunately I was not aware of this issue when sending the TX
path patches.
>> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
>> @@ -463,6 +463,7 @@ int send_and_recv_msgs_as_owner(struct wpa_driver_nl80211_data *drv,
>>  	 * has the connection owner property set in the kernel.
>>  	 */
>>  	if (drv->capa.flags & WPA_DRIVER_FLAGS_CONTROL_PORT &&
>> +	    !(drv->hostapd || drv->start_mode_ap) &&
>>  	    handle && set_owner)
>>  		if (nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_OVER_NL80211) ||
>>  		    nla_put_flag(msg, NL80211_ATTR_SOCKET_OWNER) ||
> And isn't this disabling this for RX, not TX?
>
> Is there a reason to disable this for RX in AP mode? The commit message
> is describing missing capability for TX, not RX..
You're right. It should disable TX not RX. I'll send an updated series.
Jouni Malinen April 19, 2020, 7:30 a.m. UTC | #3
> On 18. Apr 2020, at 22.10, Markus Theil <markus.theil@tu-ilmenau.de> wrote:
> You're right. It should disable TX not RX. I'll send an updated series.

Please don’t send an updated series or work on such updates yet since I’m planning on applying some of these patches and have worked on them already.

- Jouni
Markus Theil April 19, 2020, 4:54 p.m. UTC | #4
On 4/19/20 9:30 AM, Jouni Malinen wrote:
>> On 18. Apr 2020, at 22.10, Markus Theil <markus.theil@tu-ilmenau.de> wrote:
>> You're right. It should disable TX not RX. I'll send an updated series.
> Please don’t send an updated series or work on such updates yet since I’m planning on applying some of these patches and have worked on them already.
>
> - Jouni

Thanks a lot for your feedback on this series and the fixes/rework
during integration into the pending branch!

Markus
diff mbox series

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5b85cff04..cd4e2054b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -463,6 +463,7 @@  int send_and_recv_msgs_as_owner(struct wpa_driver_nl80211_data *drv,
 	 * has the connection owner property set in the kernel.
 	 */
 	if (drv->capa.flags & WPA_DRIVER_FLAGS_CONTROL_PORT &&
+	    !(drv->hostapd || drv->start_mode_ap) &&
 	    handle && set_owner)
 		if (nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_OVER_NL80211) ||
 		    nla_put_flag(msg, NL80211_ATTR_SOCKET_OWNER) ||