rlm_sql: %{sql:<long query>} - length limit

Milan Holub holub at thenet.ch
Fri Apr 20 15:26:56 CEST 2007


On Fri, Apr 20, 2007 at 01:25:05PM +0200, Milan Holub wrote:
> Is there a way how to specify more complex(longer) sql queries in freeradius
> configuration?
==> I've increased the value of MAX_STRING_LEN to 1024. Here is a patch:

ndex: src/include/libradius.h
===================================================================
RCS file: /source/radiusd/src/include/libradius.h,v
retrieving revision 1.133
diff -u -r1.133 libradius.h
--- src/include/libradius.h     18 Apr 2007 13:24:13 -0000      1.133
+++ src/include/libradius.h     20 Apr 2007 13:23:50 -0000
@@ -57,7 +57,7 @@

 #define AUTH_VECTOR_LEN                16
 #define CHAP_VALUE_LENGTH       16
-#define MAX_STRING_LEN         254     /* RFC2138: string 0-253 octets */
+#define MAX_STRING_LEN         1024    /* RFC2138: string 0-253 octets */

 #  define VENDOR(x)            ((x >> 16) & 0x7fff)


My query works now but I'm not sure whether this change might not have
some unwanted impact somewhere else since the constant is used on many
places... Alan? 

Milan Holub
holub (at) thenet (dot) ch

--------------------------------------
 TheNet-Internet Services AG,
 im Bernertechnopark, Morgenstr. 129
 CH-3018, Bern, Switzerland
 031 998 4333, Fax 031 998 4330
 http://www.thenet.ch
 http://wlan.thenet.ch
--------------------------------------



More information about the Freeradius-Users mailing list