Re: nas table in SQL backend

2006-03-08 Thread trs
How is it used? Can I modify it (e.g., add columns, change the primary
key, etc.) to better suit my environment?


On 3/8/06, Alan DeKok <[EMAIL PROTECTED]> wrote:
> trs <[EMAIL PROTECTED]> wrote:
> > The SQL scripts have a comment for the nas table that says it isn't
> > used by freeradius. Is this still the case? How is it populated
> > otherwise?
>
>   It's used.  It's not populated by the server.  It's populated by the
> admin.
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


nas table in SQL backend

2006-03-08 Thread trs
The SQL scripts have a comment for the nas table that says it isn't
used by freeradius. Is this still the case? How is it populated
otherwise?

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: SQL Accounting and Null Attribute Values

2006-03-02 Thread trs
Thanks Peter. It seems I'm using the wrong sql.conf :/.

I'm using postgres, and while setting this up I thought the
postgresql.conf file was included in the sql.conf for stuff specific
to postgres. So instead of using that for sql.conf, I modified the
default sql.conf to use the postgres driver. Lesson learned.

I'll be a bit more attentive next time. Thanks again.


On 3/2/06, Peter Nixon <[EMAIL PROTECTED]> wrote:
> On Thu 02 Mar 2006 08:39, trs wrote:
> > Accounting queries fail if an attribute is null when supplied as a
> > value for certain column types.
> > Partial line from debug output:
> >
> > radius_xlat: 'UPDATE radacct SET AcctStartTime = '2006-03-02
> > 01:18:04', AcctStartDelay = '',
> >
> > It fails with:
> >
> > rlm_sql (sql): Couldn't update SQL accounting START record - ERROR:
> > invalid input syntax for type bigint: ""
> >
> > Can freeradius substitute a zero if an integer attribute is missing
> > from an accounting packet, instead of just a null value?
>
> Yes. You need:
>
> AcctStopDelay = '%{Acct-Delay-Time:-0}'
>
> I already fixed this in the Postgresql queries a long time ago (Several years
> ago from memory). I will check and update the "other" database queries in cvs
> now :-)
>
> If you don't have a particular preference for sql server I recommend using
> Postgresql as I spent allot of time beating on those queries to make them
> robust with many different types of NAS and PG is generally more robust than
> the other databases supported by FreeRADIUS including Oracle (although we
> have a few installations of it for customers who have a "one database to rule
> them all" policy)
>
> 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
>
>
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


SQL Accounting and Null Attribute Values

2006-03-01 Thread trs
Accounting queries fail if an attribute is null when supplied as a
value for certain column types.
Partial line from debug output:

radius_xlat: 'UPDATE radacct SET AcctStartTime = '2006-03-02
01:18:04', AcctStartDelay = '',

It fails with:

rlm_sql (sql): Couldn't update SQL accounting START record - ERROR: 
invalid input syntax for type bigint: ""

Can freeradius substitute a zero if an integer attribute is missing
from an accounting packet, instead of just a null value?

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


VSA Accounting

2006-03-01 Thread trs
How does one refer to VSAs in the accounting queries in sql.conf?

I figure it would just be the name of the attribute from the
dictionary, but what if there's a VSA name the conflicts with a
standard name (e.g. "Realm")? Is there a prefix that can be used to
differenciate them?

Also, what's a better method: extending the radacct table to include
these VSAs, or using a table specifically for the VSAs?

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html