[patch] Correctly update /proc/net/hostap entries when interface is renamed

Matt Brown matt
Thu Sep 15 00:30:33 PDT 2005


Hi, 

I have created a small patch to improve the functionality of the driver
when interfaces are renamed. This functionality is particularly
important when multiple hostap interfaces are present in a machine.
Currently after renaming the interfaces (using udev
rules) /proc/net/hostap looks like this:

msb:~# ls /proc/net/hostap/
wlan0  wlan0

Obviously this prevents the user accessing entries for at least one of
the interfaces, and make it hard to determine which interface the
directory you can access refers to. With the patch
applied /proc/net/hostap looks like:

msb:~# ls /proc/net/hostap/
msb-a  msb-b

Where msb-a and msb-b are the renamed wlan0 and wlan1 respectively. The
wifi{0,1} interfaces remain unchanged. 

I believe this patch also addresses bug #49 at 
http://hostap.epitest.fi/bugz/show_bug.cgi?id=49 although I have not
tested with the ifrename utility. 

I have tested the patch with both udev rules and ip link set name. 

The patch can be found at. 
http://www.mattb.net.nz/patches/hostap/hostap-ifrename.patch

Would you please apply this patch to the CVS tree?

Kind Regards

-- 
Matt Brown
matt at mattb.net.nz
Mob +64 275 611 544 www.mattb.net.nz







More information about the Hostap mailing list