mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
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
This commit is contained in:
parent
905a32a5f4
commit
d43430d43d
@ -474,6 +474,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]");
|
||||
|
Loading…
Reference in New Issue
Block a user