From 05f1559e6690b5f886dc43b9efd518f1d951ae99 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sat, 6 Mar 2010 08:48:06 +0100 Subject: [PATCH] Receive CoA packets when they have been separated from parents 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/event.c b/src/main/event.c index bb650e0..d9e697d 100644 --- a/src/main/event.c +++ b/src/main/event.c @@ -3047,6 +3047,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 -- 2.1.4