Hello!

1. During setup of rlm_sqlippool module, I found some compatibility issues with PostgreSQL server. I remind that rlm_sqlippool uses transactions. In that case all of queries and commands including "BEGIN", "COMMIT" and "ROLLBACK" in PostgreSQL must ends with ";" or query will fail. I have this issue (is it an issue?) on PostgreSQL 7.3.15 but it should be true for 8.x versions too. I think it should be documented. 2. In sqlippool.conf %{reply:Pool-Name} is used, but in documentation said that Pool-Name is check attribute. In my tests reply:Pool-Name was empty string, so I replaced it with Pool-Name. 3. In doc/examples/postgresql.sql in radippool table definition some fields are defined as NOT NULL (and vice versa), which should not be - it causes problems when one add IP-addresses to radippool. 4. In src/include/modpriv.h , src/modules/rlm_eap/rlm_eap.h , src/modules/rlm_sql/rlm_sql.h I replaced
#include "ltdl.h"
with
#include "../../libltdl/ltdl.h"
to compile FreeRadius. My OS is FreeBSD 6.2-RELEASE, GNU Make 3.81

Patch for items 2 and 3 attached.

With best regards, Alexander V. Klepikov. E-mail: [EMAIL PROTECTED]
--- doc/examples/postgresql.sql 5 Jan 2007 15:27:05 -0000       1.1.2.8
+++ doc/examples/postgresql.sql 17 Apr 2007 13:37:56 -0000
@@ -199,13 +199,13 @@
CREATE TABLE radippool (
       id                      BIGSERIAL PRIMARY KEY,
       pool_name               text NOT NULL,
-       FramedIPAddress         INET,
-       NASIPAddress            text NOT NULL,
+       FramedIPAddress         INET NOT NULL,
+       NASIPAddress            text,
       CalledStationId         VARCHAR(64),
-       CallingStationId        text NOT NULL DEFAULT ''::text,
-       expiry_time             TIMESTAMP(0) without time zone NOT NULL,
+       CallingStationId        text DEFAULT ''::text,
+       expiry_time             TIMESTAMP(0) without time zone NOT NULL DEFAULT 
now(),
       username                text DEFAULT ''::text,
-       pool_key                VARCHAR(30) NOT NULL
+       pool_key                VARCHAR(30)
);

--
--- raddb/sqlippool.conf        17 Aug 2006 14:20:52 -0000      1.1.2.3
+++ raddb/sqlippool.conf        17 Apr 2007 13:27:08 -0000
@@ -26,7 +26,7 @@
 # like Cisco internal pools do - it _trys_ to allocate the same IP-address
 # which user had last session...
 allocate-find = "SELECT framedipaddress FROM radippool \
-  WHERE pool_name = '%{reply:Pool-Name}' AND expiry_time < 'now'::timestamp(0) 
\
+  WHERE pool_name = '%{Pool-Name}' AND expiry_time < 'now'::timestamp(0) \
  ORDER BY pool_name, (username <> '%{User-Name}'), (callingstationid <> 
'%{Calling-Station-Id}'), expiry_time \
  LIMIT 1 \
  FOR UPDATE"
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to