Re: [PATCH] Find correct driver for interface additions/removals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 15, 2016 at 01:02:08PM +0000, Roy Marples wrote:
> To pass the test case, the easiest solution is to add ifindex to the
> returned data, add a function call to the driver to return the ifindex
> and ensure they match (if the driver does infact have the function).
> 
> I ran the test 20 times, and it passed each time.
> Hopefully you can apply the attaced patch now :)
> I will re-submit my interface matching patch shortly as it now needs
> re-factoring slightly.

Thanks, applied with some cleanup and fixes. In particular, this
addition in hostapd was problematic:

> diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
> +void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
> +				 union wpa_event_data *data)

> +	hapd = hostapd_get_iface(interfaces, data->interface_status.ifname);
> +	if (hapd != NULL && hapd->driver->get_ifindex != NULL) {
> +		unsigned int ifindex;
> +
> +		ifindex = hapd->driver->get_ifindex(hapd->drv_priv);

hapd->driver and drv_priv can be NULL here and that results in NULL
pointer dereference either here or in driver_nl80211.c. I added checks
to avoid segfault in such cases (number of hwsim test cases hit this).

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux