mesh: Do not clear link state on driver event if exchange was started
authorJouni Malinen <j@w1.fi>
Wed, 6 Jan 2016 15:17:13 +0000 (17:17 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 6 Jan 2016 15:50:15 +0000 (17:50 +0200)
commitcc64fe7b9e3104c4cb990eb410930676de749e02
tree6954e51e27f206b3be5c9a447fbfd2e8ecd8a663
parentb5f5c32412718c721127742c9ce80d0f2233eb4b
mesh: Do not clear link state on driver event if exchange was started

If the local driver event for a new peer candidate arrived only after
the peer had already initiated the peering exchange, we used to clear
the link state. This resulted in the already completed (or in progress)
exchange getting abandoned and a new exchange initiated. This is not
desirable since the already started (or even completed) exchange can be
used. Clear the link state only when adding the new STA entry for the
first time, i.e., use the same !sta->my_lid condition in handling the
driver event similarly to how the peer initiated cases were already
handled.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/mesh_mpm.c