Reset ping variables in home server when marking it zombie
authorAlan T. DeKok <aland@freeradius.org>
Mon, 4 Jan 2010 16:50:22 +0000 (17:50 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 4 Jan 2010 16:50:22 +0000 (17:50 +0100)
This should only affect situations when a home server doesn't respond
to normal packets, but does respond to "ping" packets.

src/main/event.c

index a606e76..64a573e 100644 (file)
@@ -1160,6 +1160,9 @@ static void no_response_to_proxied_request(void *ctx)
        if (home->state == HOME_STATE_ALIVE) {
                home->state = HOME_STATE_ZOMBIE;
                home->zombie_period_start = now;        
+               fr_event_delete(el, &home->ev);
+               home->currently_outstanding = 0;
+               home->num_received_pings = 0;
 
                radlog(L_PROXY, "Marking home server %s port %d as zombie (it looks like it is dead).",
                       inet_ntop(home->ipaddr.af, &home->ipaddr.ipaddr,