Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/eapol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2824,6 +2824,10 @@ void eapol_register(struct eapol_sm *sm)

l_queue_push_head(state_machines, sm);

/* workaround against SEGV on fct. eapol_rx_packet by avoiding for two different eapol_frame_watches with different ids, but same eapol_sm ptr */
if ((sm->watch_id > 0) && eapol_frame_watch_remove(sm->watch_id)) {
l_debug("existing frame_watch for sm=%p with id=%u successfully removed", sm, sm->watch_id);
}
sm->watch_id = eapol_frame_watch_add(sm->handshake->ifindex,
rx_handler, sm);
sm->protocol_version = sm->handshake->proto_version;
Expand Down
12 changes: 6 additions & 6 deletions src/station.c
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,7 @@ static bool station_can_fast_transition(struct station *station,
{
uint16_t mdid;

if (!hs->mde)
if (!hs || !hs->mde)
return false;

if (ie_parse_mobility_domain_from_data(hs->mde, hs->mde[1] + 2,
Expand Down Expand Up @@ -2917,7 +2917,7 @@ static bool station_roam_scan_notify(int err, struct l_queue *bss_list,

orig_security = network_get_security(network);

if (hs->mde)
if (hs && hs->mde)
ie_parse_mobility_domain_from_data(hs->mde, hs->mde[1] + 2,
&mdid, NULL, NULL);

Expand All @@ -2930,7 +2930,7 @@ static bool station_roam_scan_notify(int err, struct l_queue *bss_list,
if (bss && !station->ap_directed_roaming) {
double cur_bss_rank = bss->rank;

if (hs->mde && bss->mde_present && l_get_le16(bss->mde) == mdid)
if (hs && hs->mde && bss->mde_present && l_get_le16(bss->mde) == mdid)
cur_bss_rank *= RANK_FT_FACTOR;

cur_bss_group_rank = evaluate_bss_group_rank(bss->addr,
Expand Down Expand Up @@ -2967,8 +2967,8 @@ static bool station_roam_scan_notify(int err, struct l_queue *bss_list,
goto next;

/* Skip result if it is not part of the ESS */
if (bss->ssid_len != hs->ssid_len ||
memcmp(bss->ssid, hs->ssid, hs->ssid_len))
if (hs && (bss->ssid_len != hs->ssid_len ||
memcmp(bss->ssid, hs->ssid, hs->ssid_len)))
goto next;

if (scan_bss_get_security(bss, &security) < 0)
Expand All @@ -2986,7 +2986,7 @@ static bool station_roam_scan_notify(int err, struct l_queue *bss_list,

rank = bss->rank;

if (hs->mde && bss->mde_present && l_get_le16(bss->mde) == mdid)
if (hs && hs->mde && bss->mde_present && l_get_le16(bss->mde) == mdid)
rank *= RANK_FT_FACTOR;

group_rank = evaluate_bss_group_rank(bss->addr, bss->frequency,
Expand Down
Loading