[PATCH] nl80211: fix get_inact_sec returning -1

Jouni Malinen j at w1.fi
Sat Nov 19 14:42:44 PST 2016

On Thu, Nov 10, 2016 at 06:37:00PM -0600, Joel Cunningham wrote:
> This commit fixes the nl80211 driver call get_inact_sec to return -1
> when sta inactivity time retrieval fails in i802_read_sta_data
> This was intended to be handled by initalizing the inactive_msec member
> to -1 but i802_read_sta_data() assumes the data parameter is
> uninitialized and memsets the entire structure, neutralizing the attempt
> to distinguish between no value (-1) and a time value of 0
> This is fixed by now requiring i802_read_sta_data callers to initialize
> the data structure first (allowing get_inact_sec to use -1). This is a
> safe change because it does not change any driver API behavior and only
> affects one other static function in driver_nl80211.c

Thanks, applied.
Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list