aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasashi Honma <honma@ictec.co.jp>2009-08-15 17:59:16 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 18:29:06 (GMT)
commit47e06549fd77734bdc859e1a578d19298093e063 (patch)
treefee14fd1d5aec9654ec4ccfc43c11fa5158c75df
parent4a713c41edc3a894beda9477f74d04e0b2292027 (diff)
downloadhostap-06-47e06549fd77734bdc859e1a578d19298093e063.zip
hostap-06-47e06549fd77734bdc859e1a578d19298093e063.tar.gz
hostap-06-47e06549fd77734bdc859e1a578d19298093e063.tar.bz2
NetBSD: Fix wired IEEE 802.1X problem
On NetBSD 5.0, when I use wired 802.1X, "Invalid argument" occurs on SIOCADDMULTI ioctl and 802.1X fails. I tried FreeBSD code, but "Address family not supported by protocol family" occurs on SIOCADDMULTI ioctl and 802.1X fails, too. This patch solves this issue. I have tested with these: OS : NetBSD 5.0 EAP : EAP-MD5 Switch : CentreCOM 8724SL (cherry picked from commit d43430d43d3592daceced77206fea5eb54346b05)
-rw-r--r--src/drivers/driver_wired.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drivers/driver_wired.c b/src/drivers/driver_wired.c
index 83cb3f9..e5e57c5 100644
--- a/src/drivers/driver_wired.c
+++ b/src/drivers/driver_wired.c
@@ -131,6 +131,15 @@ static int wpa_driver_wired_multi(const char *ifname, const u8 *addr, int add)
os_memcpy(LLADDR(dlp), addr, ETH_ALEN);
}
#endif /* __FreeBSD__ */
+#ifdef __NetBSD__
+ {
+ struct sockaddr *sap;
+ sap = (struct sockaddr *) &ifr.ifr_addr;
+ sap->sa_len = sizeof(struct sockaddr);
+ sap->sa_family = AF_UNSPEC;
+ os_memcpy(sap->sa_data, addr, ETH_ALEN);
+ }
+#endif /* __NetBSD__ */
if (ioctl(s, add ? SIOCADDMULTI : SIOCDELMULTI, (caddr_t) &ifr) < 0) {
perror("ioctl[SIOC{ADD/DEL}MULTI]");