3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-30 06:02:39 +01:00

eapol: Change the interface index data type

The ifindex should be uint32_t instead of int.
This commit is contained in:
Jukka Rissanen 2015-03-19 15:21:23 +02:00 committed by Denis Kenzior
parent 8e6bd7d613
commit acce7c9034
2 changed files with 12 additions and 11 deletions

View File

@ -497,12 +497,12 @@ void eapol_sm_set_own_rsn(struct eapol_sm *sm, const uint8_t *rsn_ie,
sm->own_rsn = l_memdup(rsn_ie, len);
}
void eapol_start(int ifindex, struct eapol_sm *sm)
void eapol_start(uint32_t ifindex, struct eapol_sm *sm)
{
l_hashmap_insert(state_machines, L_UINT_TO_PTR(ifindex), sm);
}
static void eapol_handle_ptk_1_of_4(int ifindex, struct eapol_sm *sm,
static void eapol_handle_ptk_1_of_4(uint32_t ifindex, struct eapol_sm *sm,
const struct eapol_key *ek)
{
struct crypto_ptk *ptk = (struct crypto_ptk *) sm->ptk;
@ -671,7 +671,8 @@ static bool eapol_ap_rsne_matches(const uint8_t *eapol_rsne,
return true;
}
static void eapol_handle_ptk_3_of_4(int ifindex, struct eapol_sm *sm,
static void eapol_handle_ptk_3_of_4(uint32_t ifindex,
struct eapol_sm *sm,
const struct eapol_key *ek,
const uint8_t *decrypted_key_data,
size_t decrypted_key_data_size)
@ -736,9 +737,9 @@ fail:
l_free(step4);
}
void __eapol_rx_packet(int ifindex, const uint8_t *sta_addr,
const uint8_t *aa_addr,
const uint8_t *frame, size_t len)
void __eapol_rx_packet(uint32_t ifindex,
const uint8_t *sta_addr, const uint8_t *aa_addr,
const uint8_t *frame, size_t len)
{
const struct eapol_key *ek;
struct eapol_sm *sm;

View File

@ -95,9 +95,9 @@ struct eapol_key {
uint8_t key_data[0];
} __attribute__ ((packed));
typedef int (*eapol_tx_packet_func_t)(int ifindex, const uint8_t *aa_addr,
const uint8_t *sta_addr,
const struct eapol_key *ek);
typedef int (*eapol_tx_packet_func_t)(uint32_t ifindex, const uint8_t *aa_addr,
const uint8_t *sta_addr,
const struct eapol_key *ek);
typedef bool (*eapol_get_nonce_func_t)(uint8_t nonce[]);
bool eapol_calculate_mic(const uint8_t *kck, const struct eapol_key *frame,
@ -128,7 +128,7 @@ struct eapol_key *eapol_create_ptk_4_of_4(
enum eapol_key_descriptor_version version,
uint64_t key_replay_counter);
void __eapol_rx_packet(int ifindex, const uint8_t *sta_addr,
void __eapol_rx_packet(uint32_t ifindex, const uint8_t *sta_addr,
const uint8_t *aa_addr,
const uint8_t *frame, size_t len);
@ -148,7 +148,7 @@ void eapol_sm_set_own_rsn(struct eapol_sm *sm, const uint8_t *rsn_ie,
size_t len);
struct l_io *eapol_open_pae(uint32_t index);
void eapol_start(int ifindex, struct eapol_sm *sm);
void eapol_start(uint32_t ifindex, struct eapol_sm *sm);
bool eapol_init();
bool eapol_exit();