mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 03:14:05 -05:00
25ef8529c1
This new mechanism allows P2P Client to request an IPv4 address from the GO as part of the 4-way handshake to avoid use of DHCP exchange after 4-way handshake. If the new mechanism is used, the assigned IP address is shown in the P2P-GROUP-STARTED event on the client side with following new parameters: ip_addr, ip_mask, go_ip_addr. The assigned IP address is included in the AP-STA-CONNECTED event on the GO side as a new ip_addr parameter. The IP address is valid for the duration of the association. The IP address pool for this new mechanism is configured as global wpa_supplicant configuration file parameters ip_addr_go, ip_addr_mask, ip_addr_star, ip_addr_end. For example: ip_addr_go=192.168.42.1 ip_addr_mask=255.255.255.0 ip_addr_start=192.168.42.2 ip_addr_end=192.168.42.100 DHCP mechanism is expected to be enabled at the same time to support P2P Devices that do not use the new mechanism. The easiest way of managing the IP addresses is by splitting the IP address range into two parts and assign a separate range for wpa_supplicant and DHCP server. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
73 lines
1.6 KiB
C
73 lines
1.6 KiB
C
/*
|
|
* wpa_supplicant - WPA/RSN IE and KDE definitions
|
|
* Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifndef WPA_IE_H
|
|
#define WPA_IE_H
|
|
|
|
struct wpa_sm;
|
|
|
|
struct wpa_eapol_ie_parse {
|
|
const u8 *wpa_ie;
|
|
size_t wpa_ie_len;
|
|
const u8 *rsn_ie;
|
|
size_t rsn_ie_len;
|
|
const u8 *pmkid;
|
|
const u8 *gtk;
|
|
size_t gtk_len;
|
|
const u8 *mac_addr;
|
|
size_t mac_addr_len;
|
|
#ifdef CONFIG_PEERKEY
|
|
const u8 *smk;
|
|
size_t smk_len;
|
|
const u8 *nonce;
|
|
size_t nonce_len;
|
|
const u8 *lifetime;
|
|
size_t lifetime_len;
|
|
const u8 *error;
|
|
size_t error_len;
|
|
#endif /* CONFIG_PEERKEY */
|
|
#ifdef CONFIG_IEEE80211W
|
|
const u8 *igtk;
|
|
size_t igtk_len;
|
|
#endif /* CONFIG_IEEE80211W */
|
|
const u8 *mdie;
|
|
size_t mdie_len;
|
|
const u8 *ftie;
|
|
size_t ftie_len;
|
|
const u8 *reassoc_deadline;
|
|
const u8 *key_lifetime;
|
|
const u8 *lnkid;
|
|
size_t lnkid_len;
|
|
const u8 *ext_capab;
|
|
size_t ext_capab_len;
|
|
const u8 *supp_rates;
|
|
size_t supp_rates_len;
|
|
const u8 *ext_supp_rates;
|
|
size_t ext_supp_rates_len;
|
|
const u8 *ht_capabilities;
|
|
size_t ht_capabilities_len;
|
|
const u8 *vht_capabilities;
|
|
size_t vht_capabilities_len;
|
|
const u8 *supp_channels;
|
|
size_t supp_channels_len;
|
|
const u8 *supp_oper_classes;
|
|
size_t supp_oper_classes_len;
|
|
u8 qosinfo;
|
|
u16 aid;
|
|
#ifdef CONFIG_P2P
|
|
const u8 *ip_addr_req;
|
|
const u8 *ip_addr_alloc;
|
|
#endif /* CONFIG_P2P */
|
|
};
|
|
|
|
int wpa_supplicant_parse_ies(const u8 *buf, size_t len,
|
|
struct wpa_eapol_ie_parse *ie);
|
|
int wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len);
|
|
|
|
#endif /* WPA_IE_H */
|