diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-07-04 16:48:56 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-07-04 16:48:56 +0000 |
commit | 03a3758e2d3fc5580e2243cdcd781c3cb117838b (patch) | |
tree | f5542ec35fa7600032adbc1be10475ccd71bfacd /usr.sbin/hostapd/handle.c | |
parent | 9c9b8fd0b9980abb67022628753d92ad25c851a1 (diff) |
add 'random' action address and auth open request/response
Diffstat (limited to 'usr.sbin/hostapd/handle.c')
-rw-r--r-- | usr.sbin/hostapd/handle.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/hostapd/handle.c b/usr.sbin/hostapd/handle.c index a82f37a4eb8..5ce37022dc4 100644 --- a/usr.sbin/hostapd/handle.c +++ b/usr.sbin/hostapd/handle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: handle.c,v 1.1 2005/06/17 19:13:35 reyk Exp $ */ +/* $OpenBSD: handle.c,v 1.2 2005/07/04 16:48:55 reyk Exp $ */ /* * Copyright (c) 2005 Reyk Floeter <reyk@vantronix.net> @@ -91,6 +91,11 @@ hostapd_handle_ref(u_int flags, u_int shift, u_int8_t *wfrom, u_int8_t *wto, bcopy(wto, addr, IEEE80211_ADDR_LEN); else if (flags & (HOSTAPD_ACTION_F_REF_BSSID << shift)) bcopy(wbssid, addr, IEEE80211_ADDR_LEN); + else if (flags & (HOSTAPD_ACTION_F_REF_RANDOM << shift)) { + hostapd_randval(addr, IEEE80211_ADDR_LEN); + /* Avoid multicast/broadcast addresses */ + addr[0] &= ~0x1; + } } int |