Hi folks,<br><br>I am actually working on getting fully functionnal dynamic vlan (not full dynamic) with nl80211 driver while virtual interfaces are in a brigde.<br><br>The already known problem is that the EAPOL packet are not processed by hostapd when the interface on wich the packet is received is in a bridge.<br>
I propose that we could add not only one interface in the bridge section in the hostapd.conf file but a list.<br><br>For example : <br>bridge=br1 br2 br3<br><br>The modification I propose are on the src/driver_nl80211.c file.<br>
You could find attached the modification I propose to get this comportement.<br>I think this should be move to the config.c file but I was scary that it had repercution on others drivers.<br><br><br>The bridge list cannot be longer than IFNAMSIZ (16) so be careful.<br>
I didn't see any other failure in the behavior. <br>The EAP hand-check now works and the packet are forwarded on the good interface.<br><br>Please feel free to comment <br><br>
Maxence.<br>____________________________________________________________________________________________<br>diff -ur hostapd-0.7.0-ori/hostapd-0.7.0/src/drivers/driver_nl80211.c hostapd-0.7.0/src/drivers/driver_nl80211.c<br>
--- hostapd-0.7.0-ori/hostapd-0.7.0/src/drivers/driver_nl80211.c 2009-11-21 21:49:02.000000000 +0100<br>+++ hostapd-0.7.0/src/drivers/driver_nl80211.c 2009-11-25 15:39:20.000000000 +0100<br>@@ -4418,8 +4418,19@<br>
drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);<br>
drv->if_indices = drv->default_if_indices;<br> for (i = 0; i < params->num_bridge; i++) {<br>- if (params->bridge[i])<br>- add_ifidx(drv, if_nametoindex(params->bridge[i]));<br>
+ if (params->bridge[i]){<br>+ char * brname=params->bridge[i];<br>+ char *pos=brname;<br>+ while (*pos != '\0') {<br>+ if (*pos == ' ') {<br>+ *pos = '\0';<br>
+ add_ifidx(drv, if_nametoindex(brname));<br>+ brname=pos+1;<br>+ }<br>+ pos++;<br>+ }<br>+ add_ifidx(drv, if_nametoindex(brname));<br>
+ }<br> }<br> <br> /* start listening for EAPOL on the default AP interface */_<br>_____________________________________<br><br>