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/hostapd.c | |
parent | 9c9b8fd0b9980abb67022628753d92ad25c851a1 (diff) |
add 'random' action address and auth open request/response
Diffstat (limited to 'usr.sbin/hostapd/hostapd.c')
-rw-r--r-- | usr.sbin/hostapd/hostapd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/hostapd/hostapd.c b/usr.sbin/hostapd/hostapd.c index e7dabf43f51..0e9d74857b1 100644 --- a/usr.sbin/hostapd/hostapd.c +++ b/usr.sbin/hostapd/hostapd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostapd.c,v 1.11 2005/06/17 19:13:35 reyk Exp $ */ +/* $OpenBSD: hostapd.c,v 1.12 2005/07/04 16:48:55 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -494,6 +494,20 @@ main(int argc, char *argv[]) return (EXIT_SUCCESS); } +void +hostapd_randval(u_int8_t *buf, const u_int len) +{ + u_int32_t data = 0; + u_int i; + + for (i = 0; i < len; i++) { + if ((i % sizeof(data)) == 0) + data = arc4random(); + buf[i] = data & 0xff; + data >>= 8; + } +} + struct hostapd_table * hostapd_table_add(struct hostapd_config *cfg, const char *name) { |