From: Alan T. DeKok Date: Fri, 25 Mar 2011 12:53:10 +0000 (+0100) Subject: Correct debug log for internal proxied requests X-Git-Tag: release_2_1_11~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14f534aa405cf0063bb10f4bc36493721e054246;p=thirdparty%2Ffreeradius-server.git Correct debug log for internal proxied requests --- diff --git a/src/main/auth.c b/src/main/auth.c index 1aa28f9f625..a74a0ce8b00 100644 --- a/src/main/auth.c +++ b/src/main/auth.c @@ -40,16 +40,25 @@ char *auth_name(char *buf, size_t buflen, REQUEST *request, int do_cli) VALUE_PAIR *cli; VALUE_PAIR *pair; int port = 0; + const char *tls = ""; if ((cli = pairfind(request->packet->vps, PW_CALLING_STATION_ID)) == NULL) do_cli = 0; if ((pair = pairfind(request->packet->vps, PW_NAS_PORT)) != NULL) port = pair->vp_integer; + if (request->packet->dst_port == 0) { + if (pairfind(request->packet->vps, PW_FREERADIUS_PROXIED_TO)) { + tls = " via TLS tunnel"; + } else { + tls = " via proxy to virtual server"; + } + } + snprintf(buf, buflen, "from client %.128s port %u%s%.128s%s", request->client->shortname, port, (do_cli ? " cli " : ""), (do_cli ? (char *)cli->vp_strvalue : ""), - (request->packet->dst_port == 0) ? " via TLS tunnel" : ""); + tls); return buf; }