]> git.ipfire.org Git - thirdparty/hostap.git/commit
RADIUS client: fix extra retry before failover
authorEthan Everett <ethan.everett@meraki.net>
Tue, 12 Feb 2019 22:20:04 +0000 (22:20 +0000)
committerJouni Malinen <j@w1.fi>
Mon, 30 Dec 2019 17:13:51 +0000 (19:13 +0200)
commit22319c7fed8f106be05f6a7712ef405700617be3
tree6ff2b882c035c1ca73f6a416f0680fa5a0af65e1
parent54c154d2c908a484fbb53bbdead0b70683501805
RADIUS client: fix extra retry before failover

This commit changes the failover behavior of RADIUS client. Commit
27ebadccfb2 ("RADIUS client: Cease endless retry for message for
multiple servers") changed the retry logic, causing RADIUS client to
wait RADIUS_CLIENT_NUM_FAILOVER + 1 timeouts before failing over the
first time. Prior to that commit, RADIUS client would wait
RADIUS_CLIENT_NUM_FAILOVER timeouts before each failover. This was
caused by moving the entry->attempts > RADIUS_CLIENT_NUM_FAILOVER
comparison to before the retry attempt, where entry->attempts is
incremented.

The commit in question set entry->attempts in radius_change_server to 1
instead of 0, so RADIUS client would still only wait
RADIUS_CLIENT_NUM_FAILOVER timeouts for subsequent failovers, the same
as the original behavior.

This commit changes the comparison so the initial failover now happens
after waiting RADIUS_CLIENT_NUM_FAILOVER timeouts, as it did originally.
It also changes the RADIUS_CLIENT_MAX_FAILOVER comparison to prevent an
additional attempt to the primary server after the final failover.

Signed-off-by: Ethan Everett <ethan.everett@meraki.net>
src/radius/radius_client.c