Patch proposal hostapd-nl80211: Multi bridge VLAN
Maxence Dalmais
maxence.dalmais
Wed Nov 25 06:27:27 PST 2009
Hi folks,
I am actually working on getting fully functionnal dynamic vlan (not full
dynamic) with nl80211 driver while virtual interfaces are in a brigde.
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.
I propose that we could add not only one interface in the bridge section in
the hostapd.conf file but a list.
For example :
bridge=br1 br2 br3
The modification I propose are on the src/driver_nl80211.c file.
You could find attached the modification I propose to get this comportement.
I think this should be move to the config.c file but I was scary that it had
repercution on others drivers.
The bridge list cannot be longer than IFNAMSIZ (16) so be careful.
I didn't see any other failure in the behavior.
The EAP hand-check now works and the packet are forwarded on the good
interface.
Please feel free to comment
Maxence.
____________________________________________________________________________________________
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
--- hostapd-0.7.0-ori/hostapd-0.7.0/src/drivers/driver_nl80211.c
2009-11-21 21:49:02.000000000 +0100
+++ hostapd-0.7.0/src/drivers/driver_nl80211.c 2009-11-25
15:39:20.000000000 +0100
@@ -4418,8 +4418,19@
drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
drv->if_indices = drv->default_if_indices;
for (i = 0; i < params->num_bridge; i++) {
- if (params->bridge[i])
- add_ifidx(drv, if_nametoindex(params->bridge[i]));
+ if (params->bridge[i]){
+ char * brname=params->bridge[i];
+ char *pos=brname;
+ while (*pos != '\0') {
+ if (*pos == ' ') {
+ *pos = '\0';
+ add_ifidx(drv, if_nametoindex(brname));
+ brname=pos+1;
+ }
+ pos++;
+ }
+ add_ifidx(drv, if_nametoindex(brname));
+ }
}
/* start listening for EAPOL on the default AP interface */_
_____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20091125/6e5a6a6d/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-proposal-multibridge-nl80211.patch
Type: application/octet-stream
Size: 924 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20091125/6e5a6a6d/attachment.obj
More information about the Hostap
mailing list