From: Alan T. DeKok Date: Tue, 3 Nov 2015 02:39:58 +0000 (-0500) Subject: Whine and you shall be satisfied X-Git-Tag: release_3_0_11~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dca10e35892919a0aa32d465032e447d4a9bae9c;p=thirdparty%2Ffreeradius-server.git Whine and you shall be satisfied --- diff --git a/src/main/radclient.c b/src/main/radclient.c index d139f471b94..bd605e59ad7 100644 --- a/src/main/radclient.c +++ b/src/main/radclient.c @@ -626,7 +626,6 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files) case PW_CODE_STATUS_SERVER: switch (radclient_get_code(request->packet->dst_port)) { - default: case PW_CODE_ACCESS_REQUEST: request->filter_code = PW_CODE_ACCESS_ACCEPT; break; @@ -634,6 +633,10 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files) case PW_CODE_ACCOUNTING_REQUEST: request->filter_code = PW_CODE_ACCOUNTING_RESPONSE; break; + + default: + request->filter_code = PW_CODE_MAX; + break; } break; @@ -1108,8 +1111,12 @@ static int recv_one_packet(int wait_time) /* * If we had an expected response code, check to see if the * packet matched that. + * + * Except for Status-Server, where we don't care what the + * reply is. Just that we GOT a reply. */ - if (request->reply->code != request->filter_code) { + if ((request->packet->code != PW_CODE_STATUS_SERVER) && + (request->reply->code != request->filter_code)) { if (is_radius_code(request->reply->code)) { REDEBUG("%s: Expected %s got %s", request->name, fr_packet_codes[request->filter_code], fr_packet_codes[request->reply->code]);