]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Be less aggressive about printing message
authorAlan T. DeKok <aland@freeradius.org>
Thu, 6 Jan 2011 10:49:18 +0000 (11:49 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 6 Jan 2011 10:49:18 +0000 (11:49 +0100)
If the client re-uses the same RADIUS Id, the "check_handler" callback
will be called.  However, it's *not* being called because the RADIUS packet
timed out, so we should *not* print the warning message that the EAP
session didn't finish

src/modules/rlm_eap/mem.c

index db4c3fa65d9892b24f0e8d1ec504de52bb4d83a2..da2f622fa5027e51f4385ae19f6a4627f8859392 100644 (file)
@@ -205,7 +205,20 @@ static void check_handler(void *data)
                goto done;
        }
 
-       if (check->handler->tls && !check->handler->finished) {
+       /*
+        *      No TLS means no warnings.
+        */
+       if (!check->handler->tls) goto done;
+
+       /*
+        *      If we're being deleted early, it's likely because we
+        *      received a transmit from the client that re-uses the
+        *      same RADIUS Id, which forces the current packet to be
+        *      deleted.  In that case, ignore the error.
+        */
+       if (time(NULL) < (check->handler->timestamp + 3)) goto done;
+
+       if (!check->handler->finished) {
                do_warning = TRUE;
                memcpy(state, check->handler->state, sizeof(state));
        }