[PATCH 1/2] NAN: Add gtk_support configuration parameter
Arowa Suliman
arowa at chromium.org
Wed Dec 2 14:06:05 PST 2026
On Wed, Dec 02, 2026 at 04:58:33PM +0200, Jouni Malinen wrote:
> On Sun, Nov 08, 2026 at 11:19:42AM -0800, Arowa Suliman wrote:
> > Add a 'NAN_SET gtk_support <0|1>' configuration parameter and
> > nan_set_gtk_support() helper so GTK/IGTK capability advertisement can be
> > disabled prior to starting NAN for interoperability with such peers.
>
> > +int nan_set_gtk_support(struct nan_data *nan, bool enable)
> > + if (enable)
> > + gtk_supp = NAN_CS_INFO_CAPA_GTK_SUPP_NO_BIGTK;
> > + else
> > + gtk_supp = NAN_CS_INFO_CAPA_GTK_SUPP_NONE;
>
> And the implementation seems to explicitly disable beacon protection in
> all cases. That feels wrong. This new function should likely be merged
> into the existing nan_set_beacon_prot() to cover all options (all group
> keys disabled, only GTK and IGTK enabled, all GTK/IGTK/BIGTK eneabled).
> Furthermore, the driver capability check should be done (like it is
> already in nan_set_beacon_prot()) so that this function cannot enable
> IGTK support without it actually being supported by the driver.
Thanks Jouni (and Johannes) for the feedback. After looking at this more
closely, I agree that a global pre-start gtk_support toggle is the wrong
approach -- disabling it globally conflicts with beacon protection and
group-key NDPs on the same NAN session, whereas leaving it enabled
globally still advertises GTK_SUPP on NDPs that do not configure a GTK
cipher suite.
I will drop this patch and send a replacement patch ("NAN: Gate GTK/IGTK
capability and KDEs on configured NDP GTK cipher") that instead leaves
nan->cfg->security_capab and nan_set_beacon_prot() unchanged, clears
NAN_CS_INFO_CAPA_GTK_SUPP_MASK per NDP in M1/M2 when
ndp_sec->local_gtk.csid == NAN_CS_NONE, and guards nan_sec_igtk_kde()
with nan_sec_igtk_supported(ndp_sec).
Regards,
Arowa
More information about the Hostap
mailing list