Receive CoA packets when they have been separated from parents
authorAlan T. DeKok <aland@freeradius.org>
Sat, 6 Mar 2010 07:48:06 +0000 (08:48 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 6 Mar 2010 07:50:24 +0000 (08:50 +0100)
Otherwise, the code thinks that there is a proxy reply WITHOUT
an original reply..

There's still likely a bug, as the CoA request->reply is built BEFORE
the original->reply.  The post-proxy CoA work should very likely have
complete access to the original reply packet type

src/main/event.c

index c076c43..91046b4 100644 (file)
@@ -3131,6 +3131,18 @@ REQUEST *received_proxy_response(RADIUS_PACKET *packet)
                request->parent->coa = NULL;
                request->parent = NULL;
 
+               /*
+                *      The proxied packet was different from the
+                *      original packet, AND the proxied packet was
+                *      a CoA: allow it.
+                */
+       } else if ((request->packet->code != request->proxy->code) &&
+                  ((request->proxy->code == PW_COA_REQUEST) ||
+                   (request->proxy->code == PW_DISCONNECT_REQUEST))) {
+         /*
+          *    It's already divorced: do nothing.
+          */
+         
        } else
                /*
                 *      Skip the next set of checks, as the original