2023-11-24 19:08:16

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v3 1/1] wifi: nl80211: Add PTK/GTK rekey interval attributes for APs supporting PSK offload

On Mon, 2023-11-13 at 18:17 +0530, Jithu Jance wrote:
> This patch adds attributes to NL80211_CMD_START_AP that the user application
> can use to pass down PTK/GTK rekey interval times to the driver. If driver can't
> support the configuration, it is expected to return failure to NL8011_CMD_START_AP.

That doesn't work, _all_ current drivers will obviously completely
ignore this setting. If you need that behaviour, you need to add new
feature flags for it.

> + if (info->attrs[NL80211_ATTR_PTK_REKEY_INTERVAL])
> + settings->ptk_rekey_interval = nla_get_u32(info->attrs[NL80211_ATTR_PTK_REKEY_INTERVAL]);
> + else
> + settings->gtk_rekey_interval = nla_get_u32(info->attrs[NL80211_ATTR_GTK_REKEY_INTERVAL]);
>

Why can you not set both at the same time?! That should be documented,
if it's really desired, but that seems really counter-intuitive?

johannes


2023-11-25 02:40:40

by Jithu Jance

[permalink] [raw]
Subject: Re: [PATCH v3 1/1] wifi: nl80211: Add PTK/GTK rekey interval attributes for APs supporting PSK offload

>That doesn't work, _all_ current drivers will obviously completely
ignore this setting.
Got your point - without this user space will not be sure whether GTK/PTK
will work with the driver even though values are passed down. Will add it.


>Why can you not set both at the same time?!
Yes, agree. will fix it.

*Jithu Jance *


On Sat, Nov 25, 2023 at 12:33 AM Johannes Berg <[email protected]>
wrote:

> On Mon, 2023-11-13 at 18:17 +0530, Jithu Jance wrote:
> > This patch adds attributes to NL80211_CMD_START_AP that the user
> application
> > can use to pass down PTK/GTK rekey interval times to the driver. If
> driver can't
> > support the configuration, it is expected to return failure to
> NL8011_CMD_START_AP.
>
> That doesn't work, _all_ current drivers will obviously completely
> ignore this setting. If you need that behaviour, you need to add new
> feature flags for it.
>
> > + if (info->attrs[NL80211_ATTR_PTK_REKEY_INTERVAL])
> > + settings->ptk_rekey_interval =
> nla_get_u32(info->attrs[NL80211_ATTR_PTK_REKEY_INTERVAL]);
> > + else
> > + settings->gtk_rekey_interval =
> nla_get_u32(info->attrs[NL80211_ATTR_GTK_REKEY_INTERVAL]);
> >
>
> Why can you not set both at the same time?! That should be documented,
> if it's really desired, but that seems really counter-intuitive?
>
> johannes
>


Attachments:
smime.p7s (4.11 kB)
S/MIME Cryptographic Signature