Browse Source

DragonFly BSD: Fix wired IEEE 802.1X

On DragonFly BSD, wired IEEE 802.1X fails with this message:
ioctl[SIOC{ADD/DEL}MULTI]: Invalid argument

This patch solves this issue.

I have tested with these:
OS : DragonFly BSD 2.4.0
EAP : EAP-TLS
Switch : Cisco Catalyst 2950
Masashi Honma 15 years ago
parent
commit
f335c69e14
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/drivers/driver_wired.c

+ 4 - 4
src/drivers/driver_wired.c

@@ -21,9 +21,9 @@
 #include <net/if_arp.h>
 #include <net/if_arp.h>
 #include <net/if.h>
 #include <net/if.h>
 #endif /* __linux__ */
 #endif /* __linux__ */
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <net/if_dl.h>
 #include <net/if_dl.h>
-#endif /* __FreeBSD__ */
+#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */
 
 
 #include "common.h"
 #include "common.h"
 #include "driver.h"
 #include "driver.h"
@@ -461,7 +461,7 @@ static int wpa_driver_wired_multi(const char *ifname, const u8 *addr, int add)
 	ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
 	ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
 	os_memcpy(ifr.ifr_hwaddr.sa_data, addr, ETH_ALEN);
 	os_memcpy(ifr.ifr_hwaddr.sa_data, addr, ETH_ALEN);
 #endif /* __linux__ */
 #endif /* __linux__ */
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 	{
 	{
 		struct sockaddr_dl *dlp;
 		struct sockaddr_dl *dlp;
 		dlp = (struct sockaddr_dl *) &ifr.ifr_addr;
 		dlp = (struct sockaddr_dl *) &ifr.ifr_addr;
@@ -473,7 +473,7 @@ static int wpa_driver_wired_multi(const char *ifname, const u8 *addr, int add)
 		dlp->sdl_slen = 0;
 		dlp->sdl_slen = 0;
 		os_memcpy(LLADDR(dlp), addr, ETH_ALEN);
 		os_memcpy(LLADDR(dlp), addr, ETH_ALEN);
 	}
 	}
-#endif /* __FreeBSD__ */
+#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */
 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
 	{
 	{
 		struct sockaddr *sap;
 		struct sockaddr *sap;