From: Arran Cudbard-Bell Date: Mon, 17 Oct 2011 15:35:07 +0000 (+0200) Subject: Add one char expansion for RADIUS request ID X-Git-Tag: release_3_0_0_beta0~585 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab4e5809809cd08d6d8bf71f1f0c9f3c8a72f8cb;p=thirdparty%2Ffreeradius-server.git Add one char expansion for RADIUS request ID --- diff --git a/doc/variables.rst b/doc/variables.rst index 1db65a0e8b8..b07ef46d15c 100644 --- a/doc/variables.rst +++ b/doc/variables.rst @@ -95,6 +95,8 @@ release. They also do NOT permit the use of conditional syntax +-----------+---------------------------+-----------------------+ |%i |Calling Station ID |%{Calling-Station-Id} | +-----------+---------------------------+-----------------------+ +|%I |request ID | | ++-----------+---------------------------+-----------------------+ |%l |request timestamp | | +-----------+---------------------------+-----------------------+ |%m |request month (MM) | | diff --git a/src/main/xlat.c b/src/main/xlat.c index 51f68326c24..518b2b380ea 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -1287,6 +1287,12 @@ int radius_xlat(char *out, int outlen, const char *fmt, q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_IP_ADDRESS, 0),PW_TYPE_IPADDR, func); p++; break; + case 'I': /* Request ID */ + snprintf(tmpdt, sizeof(tmpdt), "%i", request->packet->id); + strlcpy(q, tmpdt, freespace); + q += strlen(q); + p++; + break; case 'i': /* Calling station ID */ q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_CALLING_STATION_ID, 0),PW_TYPE_STRING, func); p++;