Commit Graph

23 Commits (b5b1b18f3999caa91f940a9458e3a56f06dbe671)

Author SHA1 Message Date
Jouni Malinen bbb921daaa Maintain internal entropy pool for augmenting random number generation
By default, make hostapd and wpa_supplicant maintain an internal
entropy pool that is fed with following information:

hostapd:
- Probe Request frames (timing, RSSI)
- Association events (timing)
- SNonce from Supplicants

wpa_supplicant:
- Scan results (timing, signal/noise)
- Association events (timing)

The internal pool is used to augment the random numbers generated
with the OS mechanism (os_get_random()). While the internal
implementation is not expected to be very strong due to limited
amount of generic (non-platform specific) information to feed the
pool, this may strengthen key derivation on some devices that are
not configured to provide strong random numbers through
os_get_random() (e.g., /dev/urandom on Linux/BSD).

This new mechanism is not supposed to replace proper OS provided
random number generation mechanism. The OS mechanism needs to be
initialized properly (e.g., hw random number generator,
maintaining entropy pool over reboots, etc.) for any of the
security assumptions to hold.

If the os_get_random() is known to provide strong ramdom data (e.g., on
Linux/BSD, the board in question is known to have reliable source of
random data from /dev/urandom), the internal hostapd random pool can be
disabled. This will save some in binary size and CPU use. However, this
should only be considered for builds that are known to be used on
devices that meet the requirements described above. The internal pool
is disabled by adding CONFIG_NO_RANDOM_POOL=y to the .config file.
14 years ago
Jouni Malinen 1f4c7b6b2a hostapd: Fix compiler warning
Commit 83e843e830 copied a workaround
without updating the return value to match with the void function.
14 years ago
Jouni Malinen 83e843e830 hostapd: Avoid crashing on station mode disassoc event
Some driver wrappers may end up indicating a disassociation or
deauthentication event without the address of the station, e.g.,
based on a previous non-AP mode event. Avoid crashing hostapd
by verifying that the require address parameter is available in
the event before processing it.
14 years ago
Jouni Malinen 3f4ce13fde P2P: Track non-P2P members in the group and set Group Limit bit
The P2P group component is now tracking of associated stations
in the group and the Group Limit bit in the Group Capabilities
is updated based on whether there is room for new clients in
the group.
14 years ago
Jouni Malinen ef7963917c P2P: Add group notification from (re)association request 14 years ago
Jouni Malinen b305c684b8 P2P: Save a copy of P2P IE(s) data from (Re)Association Request 14 years ago
Jouni Malinen 54f489be45 WPS 2.0: Validate WPS attributes in management frames and WSC messages
If CONFIG_WPS_STRICT is set, validate WPS IE(s) in management frames and
reject the frames if any of the mandatory attributes is missing or if an
included attribute uses an invalid value. In addition, verify that all
mandatory attributes are included and have valid values in the WSC
messages.
14 years ago
Jouni Malinen 68532a9ceb Avoid hostapd segfault on invalid driver association event
Running hostapd and wpa_supplicant on the same interface at the same
time is not expected to work, but it should not cause hostapd to crash.
Ignore station mode association events (no addr field) to avoid this.
14 years ago
Jouni Malinen 9a3cb18d74 Add AP-STA-DISCONNECT event for driver-based MLME 14 years ago
Jouni Malinen c41a1095b5 Allow hostapd_notif_assoc() to be called with all IEs
This makes the call simpler for driver wrappers since there is no need
to parse the IEs anymore before indicating association. In addition,
this allows association processing to be extended to use other IEs
in the future.
14 years ago
Jouni Malinen 1d041bec84 Use generic driver event notification for AP mode assoc/disassoc 15 years ago
Jouni Malinen a8e0505bf0 Use driver event, EVENT_EAPOL_RX, for EAPOL frame indication 15 years ago
Jouni Malinen a70a5d6d06 Replace hostapd_notif_new_sta() with new driver event, EVENT_NEW_STA 15 years ago
Jouni Malinen 9646a8ab8b Remove unnecessary wpa_event_type typedef 15 years ago
Jouni Malinen 2a8b74163e Move struct hostapd_frame_info definition away from driver API
This is internal data structure for hostapd/AP functionality and does
not need to be defined in driver.h.
15 years ago
Jouni Malinen 0d9fc3d8bd Remove struct ieee80211_hdr dependency from EVENT_RX_FROM_UNKNOWN
It is simpler to just pass in u8* to the beginning of the header.
15 years ago
Jouni Malinen a0e0d3bb15 Replace hostapd_probe_req_rx() with EVENT_RX_PROBE_REQ driver event 15 years ago
Jouni Malinen cd7d80f373 Allow Probe Request callbacks to terminate iteration 15 years ago
Jouni Malinen 81f4f6195e Include header files explicitly in *.c, not via header files 15 years ago
Jouni Malinen 6e6e8c31ff Replace src/ap/driver_i.h with non-inlined functions in ap_drv_ops.c 15 years ago
Jouni Malinen 8b06c1ed0d Remove ap_config.h dependency from driver_i.h
This adds explicit #include line for ap_config.h into the src/ap/*.c
files that actually use the definitions from there.
15 years ago
Jouni Malinen 6226e38d00 Rename some src/ap files to avoid duplicate file names
Doxygen and some build tools may get a bit confused about same file
name being used in different directories. Clean this up a bit by
renaming some of the duplicated file names in src/ap.
15 years ago
Jouni Malinen 70db2ab308 Move rest of the generic AP mode functionality into src/ap 15 years ago