2018-11-16 23:22:54 +01:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct owe_sm;
|
|
|
|
struct handshake_state;
|
|
|
|
|
|
|
|
typedef void (*owe_tx_authenticate_func_t)(void *user_data);
|
|
|
|
typedef void (*owe_tx_associate_func_t)(struct iovec *ie_iov, size_t iov_len,
|
|
|
|
void *user_data);
|
|
|
|
typedef void (*owe_complete_func_t)(uint16_t status, void *user_data);
|
|
|
|
|
|
|
|
struct owe_sm *owe_sm_new(struct handshake_state *hs,
|
|
|
|
owe_tx_authenticate_func_t auth,
|
|
|
|
owe_tx_associate_func_t assoc,
|
|
|
|
owe_complete_func_t complete, void *user_data);
|
|
|
|
void owe_sm_free(struct owe_sm *owe);
|
|
|
|
|
|
|
|
void owe_start(struct owe_sm *owe);
|
netdev: process association in netdev_associate_event
Apart from OWE, the association event was disregarded and all association
processing was done in netdev_connect_event. This led to
netdev_connect_event having to handle all the logic of both success and
failure, as well as parsing the association for FT and OWE. Also, without
checking the status code in the associate frame there is the potential
for the kernel to think we are connected even if association failed
(e.g. rogue AP).
This change introduces two flags into netdev, expect_connect_failure and
ignore_connect_event. All the FT processing that was once in
netdev_connect_event has now been moved into netdev_associate_event, as
well as non-FT associate frame processing. The connect event now only
handles failure cases for soft/half MAC cards.
Note: Since fullmac cards rely on the connect event, the eapol_start
and netdev_connect_ok were left in netdev_connect_event. Since neither
auth/assoc events come in on fullmac we shouldn't have any conflict with
the new flags.
Once a connection has completed association, EAPoL is started from
netdev_associate_event (if required) and the ignore_connect_event flag can
be set. This will bypass the connect event.
If a connection has failed during association for whatever reason, we can
set expect_connect_failure, the netdev reason, and the MPDU status code.
This allows netdev_connect_event to both handle the error, and, if required,
send a deauth telling the kernel that we have failed (protecting against the
rogue AP situation).
2019-03-05 22:42:33 +01:00
|
|
|
bool owe_retry(struct owe_sm *owe);
|
2018-11-16 23:22:54 +01:00
|
|
|
void owe_rx_authenticate(struct owe_sm *owe);
|
|
|
|
void owe_rx_associate(struct owe_sm *owe, const uint8_t *frame, size_t len);
|