[PATCH v2] Fix nl80211 driver to recieve EAPOL response

Artem Antonov artem.v.antonov
Mon Apr 7 10:31:38 PDT 2008


ok. updated patch:

diff -urN hostap/hostapd/driver_nl80211.c hostap/hostapd/driver_nl80211.c
--- hostap/hostapd/driver_nl80211.c	2008-04-07 00:11:17.000000000 +0400
+++ hostap/hostapd/driver_nl80211.c	2008-04-07 20:19:47.000000000 +0400
@@ -51,6 +51,7 @@
 	struct hostapd_data *hapd;

 	char iface[IFNAMSIZ + 1];
+	int bridge;
 	int ioctl_sock; /* socket for ioctl() use */
 	int wext_sock; /* socket for wireless events */
 	int eapol_sock; /* socket for EAPOL frames */
@@ -122,6 +123,9 @@
 {
 	int i;

+	if (ifidx == drv->bridge)
+	    return 1;
+
 	for (i = 0; i < drv->num_if_indices; i++)
 		if (drv->if_indices[i] == ifidx)
 			return 1;
@@ -2281,6 +2284,7 @@

 	drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
 	drv->if_indices = drv->default_if_indices;
+	drv->bridge = if_nametoindex(hapd->conf->bridge);

 	if (i802_init_sockets(drv, bssid))
 		goto failed;


2008/4/7, Jouni Malinen <j at w1.fi>:
> On Mon, Apr 07, 2008 at 08:14:25PM +0400, Artem Antonov wrote:
>  > This patch fixes nl80211 driver to recieve EAPOL response if wlan0 was
>  > added to bridge.
>
>
> Thanks! However, I would prefer to move this extra test for bridge
>  ifindex into have_ifidx() (i.e., no change at the caller) and it would
>  probably be better to do if_nametoindex() only once during
>  initialization and store the ifindex in struct i802_driver_data.
>  hapd->conf->bridge can be empty, but I would assume if_nametoindex()
>  handles that fine for this type of use (returned 0 should not match
>  sll_ifindex).
>
>
>  --
>  Jouni Malinen                                            PGP id EFC895FA
>



More information about the Hostap mailing list