]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
driver_ndis: Add PAE group address to the multicast address
authorJouni Malinen <j@w1.fi>
Sat, 7 Mar 2009 21:10:41 +0000 (23:10 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Mar 2009 21:10:41 +0000 (23:10 +0200)
This is done with wired interfaces to fix IEEE 802.1X authentication
when the authenticator uses the group address (which should be happening
with wired Ethernet authentication).

This allows wpa_supplicant to complete wired authentication successfully
on Vista with a NDIS 6 driver, but the change is likely needed for
Windows XP, too.

src/drivers/driver_ndis.c
wpa_supplicant/ChangeLog

index c2d7eeafe9339b83b952e5ddaf69b8e33a043e08..0935bb0d3d1e8682accd60e526b43021d8eec13b 100644 (file)
@@ -56,6 +56,10 @@ static int wpa_driver_ndis_adapter_open(struct wpa_driver_ndis_data *drv);
 static void wpa_driver_ndis_adapter_close(struct wpa_driver_ndis_data *drv);
 
 
+static const u8 pae_group_addr[ETH_ALEN] =
+{ 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03 };
+
+
 /* FIX: to be removed once this can be compiled with the complete NDIS
  * header files */
 #ifndef OID_802_11_BSSID
@@ -610,12 +614,7 @@ static int wpa_driver_ndis_get_bssid(void *priv, u8 *bssid)
                 * Report PAE group address as the "BSSID" for wired
                 * connection.
                 */
-               bssid[0] = 0x01;
-               bssid[1] = 0x80;
-               bssid[2] = 0xc2;
-               bssid[3] = 0x00;
-               bssid[4] = 0x00;
-               bssid[5] = 0x03;
+               os_memcpy(bssid, pae_group_addr, ETH_ALEN);
                return 0;
        }
 
@@ -2704,6 +2703,19 @@ static void wpa_driver_ndis_adapter_close(struct wpa_driver_ndis_data *drv)
 }
 
 
+static int ndis_add_multicast(struct wpa_driver_ndis_data *drv)
+{
+       if (ndis_set_oid(drv, OID_802_3_MULTICAST_LIST,
+                        (const char *) pae_group_addr, ETH_ALEN) < 0) {
+               wpa_printf(MSG_DEBUG, "NDIS: Failed to add PAE group address "
+                          "to the multicast list");
+               return -1;
+       }
+
+       return 0;
+}
+
+
 static void * wpa_driver_ndis_init(void *ctx, const char *ifname)
 {
        struct wpa_driver_ndis_data *drv;
@@ -2805,6 +2817,7 @@ static void * wpa_driver_ndis_init(void *ctx, const char *ifname)
                        drv->wired = 1;
                        drv->capa.flags |= WPA_DRIVER_FLAGS_WIRED;
                        drv->has_capability = 1;
+                       ndis_add_multicast(drv);
                }
        }
 
index 80f8c288d88f44e18aa70481a7b3cc933ca342d5..b2a86edcf8c40851bc3e490fa3211a00927ef21b 100644 (file)
@@ -14,6 +14,8 @@ ChangeLog for wpa_supplicant
          with nl80211
        * added support for WPS USBA out-of-band mechanism with USB Flash
          Drives (UFD) (CONFIG_WPS_UFD=y)
+       * driver_ndis: add PAE group address to the multicast address list to
+         fix wired IEEE 802.1X authentication
 
 2009-01-06 - v0.6.7
        * added support for Wi-Fi Protected Setup (WPS)