[RFC][PATCH] Enabling interface addition/removal detection and matching

Masashi Honma honma at ictec.co.jp
Tue May 19 20:55:19 EDT 2009


Roy Marples wrote:

> Hi
> 
> I dislike the way wpa_supplicant has to know about specific wireless 
> interfaces at load time, so I've looked into enabling automatic 
> detection. This also solves an issue of the interface not existing at 
> load time, which is commonly the case for pcmcia users. Now each 
> supported OS has a "generic" driver instead of per device drivers this 
> should be possible.
> 
> Anyway, this command
> 
> wpa_supplicant -c /etc/wpa_supplicant.conf -i iwi0
> 
> Can be replaced like so
> 
> wpa_supplicant -c /etc/wpa_supplicant.conf -m "*"
> 
> or with some restrictions
> 
> wpa_supplicant -c /etc/wpa_supplicant.conf -m "iwi*" -m "iwp*"
> 
> The attached patch enables this. However, it's not yet suitable for 
> merging into hostapd because only Linux wext, BSD drivers and wired 
> work. The others don't because they reference the Linux wext driver and 
> my changes are quite invasive for parts other drivers reference.
> This is what the RFC part of this email is about - should we split parts 
> of the wext driver out into a driver_linux.c file that doesn't do 
> anything aside from handling generic interface foo or recode everything 
> around wext as it stands? I can try and do the work, but lack the 
> hardware to actually test any results with.
> 
> Also, the patch addresses a lot of the shortcomings in the BSD driver 
> for NetBSD, which Masashi Honma addressed [1] and some improvements I've 
> made (merging hostap / wpa functions a little) and fixes a few issues 
> found in wpa_supplicant regarding global_init. hostapd now compiles for 
> NetBSD with this patch as well, but is untested as yet.
> 
> I realize that NetworkManager (Linux) and devd (FreeBSD) don't really 
> require this, but NetBSD has neither and this patch is a very good 
> solution for us. It's also good for Linux systems without NetworkManager.
> 
> Any comments welcome :)
> 
> Thanks
> 
> Roy
> 
> [1] http://lists.shmoo.com/pipermail/hostap/2009-April/019729.html
> The only adjustment I've not incorporated is on his line -301,13 +342,23 
> as I don't understand that part and it's not in NetBSD cvs for 
> wpa_supplicant.
> 

Hello, Roy.
You sent this mail to hostapd list and CCed to me.
But this is not on list. Maybe because of attachment size.
So I attached your full mail and compressed attachment.

I will comment.

> The only adjustment I've not incorporated is on his line
> -301,13 +342,23 as I don't understand that part and it's
> not in NetBSD cvs for wpa_supplicant.

Yes. This is not on cvs, because it made by me.
This patch will replace get_scan_results function with
get_scan_results2 function.
The get_scan_results is parsing WPA/RSN IEs by itself.
Therefore the get_scan_results needs to be modified when we need
additional IEs.

Just now, we need WPS IE as additional IE.
We have two selections for modification.
First is modification of get_scan_results.
Second is replace get_scan_results with get_scan_results2.
On second selection, get_scan_results2 doesn't need to parse IEs
by itself. Because upper function parse it. And we don't need to
change get_scan_results2 anymore when other addtional IEs will be
needed. Therefore I selected second way.

Regards,
Masashi Honma.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hostap-ifmatch.zip
Type: application/zip
Size: 12705 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20090520/29987e0f/attachment.zip 


More information about the HostAP mailing list