]> git.ipfire.org Git - thirdparty/hostap.git/commit
RADIUS client: Cease endless retry for message for multiple servers
authorBo Chen <bochen@meraki.com>
Thu, 10 May 2018 07:48:41 +0000 (07:48 +0000)
committerJouni Malinen <j@w1.fi>
Mon, 7 Jan 2019 21:38:18 +0000 (23:38 +0200)
commit27ebadccfb2ebec8907a64d37bb8c4fae665c5ba
tree86b0943106b00e32c3a680550d391e963e4da302
parent08e6721e87b66a3c0dd8c53546666993a72487c7
RADIUS client: Cease endless retry for message for multiple servers

In the previous RADIUS client implementation, when there are multiple
RADIUS servers, we kept trying the next server when the current message
can not be acked. It leads to endless retry when all the RADIUS servers
are down.

Fix this by keeping a counter for the accumulated retransmit attempts
for the message, and guarantee that after all the servers failover
RADIUS_CLIENT_MAX_FAILOVER times the message will be dropped.

Another issue with the previous code was that the decision regarding
whether the server should fail over was made immediately after we send
out the message. This patch guarantees we consider whether a server
needs failover after pending ack times out.

Signed-off-by: Bo Chen<bochen@meraki.com>
src/radius/radius_client.c