UPDATED: dumb humble question about sqlippool

Guilherme Franco guilhermefranco at gmail.com
Tue Oct 3 18:29:52 CEST 2006


Hello,

I've installed Postgres with exactly the same configuration as
Oracle's and Postgres works.

The only point of failure using Oracle should be in radippool
Framedipaddress which is VARCHAR in Oracle but is INET in Postgres.

Could be a parsing error in rlm_sqlippool.c

That's because xlat outputs:
---------------------------------------------
'SELECT framedipaddress FROM (select framedipaddress from radippool
WHERE pool_name = 'SPW' ORDER BY dbms_random.value) where rownum = 1'
sqlippool_query1: row[0] returned NULL
rlm_sqlippool: ip=[] len=0
radius_xlat:  'COMMIT'
rlm_sqlippool: IP number could not be allocated.
---------------------------------------------

The same query on sqlplus is ok:
SQL> SELECT framedipaddress FROM (select framedipaddress from
radippool WHERE pool_name = 'SPW' ORDER BY dbms_random.value) where
rownum = 1;

FRAMEDIPADDRESS
------------------------------
192.168.1.3

Now, considering that Postgres works like a breeze, how can I setup
just sqlippool.conf to look in postgres, but the regular user and
password queries to look in oracle?

I've created a sql.conf containing oracle's confs (sql{..}) and
sql2.conf containing postgres confs (sql2{...}).

If I specify sql-instance-name = "sql2" in sqlippool.conf it does not works.

I appreciate any help on this issue. Thanks!


On 9/29/06, Peter Nixon <listuser at peternixon.net> wrote:
> On Fri 29 Sep 2006 15:23, Guilherme Franco wrote:
> > Thanks for all the answers Mr. Peter!
> >
> > To clarify some things:
> > >> NONE of the ippool modules let you set the pool name. You HAVE to set
> > >> Pool-Name = whatever as a check
> > >> item!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> >
> > The radcheck table already have Pool-Name := "whatever" as a
> > attribute, op, value for all users, but that's ok because I can set it
> > manually in sqlippool.conf and the select DOES run in the correct
> > table then (xlat outputs correctly then and I did a network sniff that
> > shows the query is ok).
>
> If you set it in sqlippool.conf it is ignored by the module........ It will
> make no difference to the operation at all.
>
> > > Other issue is related to multiple pools, one with dynamic IP's and
> > > other with fixed ones (actually it's not possible to do that with only
> > > just one sqlippool.conf file without modifying rlm_sqlippool.c).
> > >
> > >> IT IS!!!!!!!!!!!!!!!!!!!!!!
> > >> Run two copies of the module!
> >
> > Sorry, i meant that I think that it is not possible without loading 2
> > or more modules (just with one module and one sqlippool.conf) dumb
> > question, sorry.
>
> OK. We we specifically designed the module so you can run more than one
> instance of it (like most other radius modules) and the different instances
> may have different queries, tables and sql connections (Completely different
> database types if you wish)
>
> > > Another thing lies in proxy -> if the proxy returns IP 255.255.255.254
> > > for me, sqlippool does not overrides it and do nothing (it doesn't
> > > have the override = yes option like ippool).
> > >
> > >>This can be added. Although why would you return an IP like that when you
> > >> dont need to? Just return the Pool-Name and let the module do its job.
> >
> > I didn't think about it, thanks.
>
> You are welcome :-)
>
> Infact we have added today the capability to detect an ip address of
> 255.255.255.254 but this makes no sense except for when you are acting as a
> proxy and wish to add an ip address from a pool to an accept packet comming
> from a home server. Just use "Pool-Name" for all local users.
>
> > Besides that I had to remove the BEGIN statement of allocate-begin
> > (and all other begins)  because oracle does not need it, and if you
> > need to specify begin, then it needs to be in a different way (through
> > the sniff, I saw that the begin was stated, then 4 "space" chars and
> > then a "/" which is the same as doing "BEGIN;    /" in sqlplus,
> > generating "ORA end-of-file errors") Don't know from where that "/"
> > came from thought. To solve this, I had to change "BEGIN" in
> > allocate-begin for "commit" (a normal oracle operation before any
> > query).
>
> Please send me a copy (privately if you wish) of your existing sqlippool.conf
> and working source code (or patch) so that we can integrate it into the
> existing code.
>
> > About the postgresql installation, I was thinking in installing it. I
> > will do that just to see it's behaviour, thanks.
>
> OK. I assumed that you had done this long ago. Please do it as a test.
>
> > THANKS A LOT AGAIN!
>
> Cheers
>
> --
>
> Peter Nixon
> http://www.peternixon.net/
> PGP Key: http://www.peternixon.net/public.asc
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20061003/a4ea730b/attachment.pgp>


More information about the Freeradius-Users mailing list