[PATCH 3/3] AP: Consider regulatory limitation when filling WMM IE

Otcheretianski, Andrei andrei.otcheretianski at intel.com
Wed Jun 5 02:07:56 PDT 2019


> 
> Thanks, applied full patch set with some cleanup and fixes. In particular,
> 

Thanks :)

> > diff --git a/src/ap/wmm.c b/src/ap/wmm.c
> > +static void wmm_calc_regulatory_limit(struct hostapd_data *hapd,
> > +				      struct hostapd_wmm_ac_params *acp) {
> > +	struct hostapd_hw_modes *mode = hapd->iface->current_mode;
> 
> mode could be NULL here..
> 
> > +	for (c = 0; c < mode->num_channels; c++) {
> 
> .. and that would crash the process due to NULL pointer dereference.
> This was easy to find with hwsim test cases, so I'd recommend running those for
> proposed changes to avoid having to wait for me to hit the issue when I run the
> tests before pushing out the commits..

Sorry about that, we run the hwsim regularly - still trying to understand how come that I missed that.

Andrei
> 
> --
> Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list