Gigaword support, compiling today
Stefan Winter
stefan.winter at restena.lu
Wed May 30 08:12:23 CEST 2007
> $ cvs diff -u dir1/file1 dir2/file2 > patch
>
> Please. The patch doesn't include directory prefixes, and isn't in a
> format we can apply.
Sorry. Attached a proper one. Note that except for the Gigawords thing, all
other changes are whitespace changes. No tabs, just quite a few \
linebreaks and filler spaces to hopefully make stuff easier read- and
diffable.
This version is not tested at all because today morning's CVS build doesn't
compile. Will do tests as soon as I get a working "make install".
Three compiling issues so far:
- fresh this morning:
gmake[4]: Entering directory `/home/swinter/Development/radiusd/src/lib'
/home/swinter/Development/radiusd/libtool --mode=compile
gcc -g -O2 -D_LIBRADIUS -I/home/swinter/Development/radiusd/src -c print.c
gcc -g -O2 -D_LIBRADIUS -I/home/swinter/Development/radiusd/src -c
print.c -fPIC -DPIC -o .libs/print.o
print.c: In function 'vp_prints_value':
print.c:220: error: 'VALUE_PAIR' has no member named 'vp_ether'
- I ran into this sed -i thing on "make install" yesterday
- NEW? make -j 3 fails to pick up a dependency of sources and breaks during
rlm_eap_ttls. A second make -j 3 try then compiles successfully, so it's
probably just the build system not getting compile orders correct.
Unfortunately I have *no* clue how to fix build systems. Will post make
output when point 1 above is fixed and I can get to this point at all :-)
Greetings,
Stefan
--
Stefan WINTER
Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
Ingenieur Forschung & Entwicklung
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: stefan.winter at restena.lu Tel.: +352 424409-1
http://www.restena.lu Fax: +352 422473
-------------- next part --------------
Index: doc/examples/mysql.sql
===================================================================
RCS file: /source/radiusd/doc/examples/mysql.sql,v
retrieving revision 1.4
diff -u -r1.4 mysql.sql
--- doc/examples/mysql.sql 22 Sep 2006 12:26:21 -0000 1.4
+++ doc/examples/mysql.sql 30 May 2007 06:04:51 -0000
@@ -30,8 +30,8 @@
AcctAuthentic varchar(32) default NULL,
ConnectInfo_start varchar(50) default NULL,
ConnectInfo_stop varchar(50) default NULL,
- AcctInputOctets bigint(12) default NULL,
- AcctOutputOctets bigint(12) default NULL,
+ AcctInputOctets bigint(20) default NULL,
+ AcctOutputOctets bigint(20) default NULL,
CalledStationId varchar(50) NOT NULL default '',
CallingStationId varchar(50) NOT NULL default '',
AcctTerminateCause varchar(32) NOT NULL default '',
Index: raddb/sql/mysql-dialup.conf
===================================================================
RCS file: /source/radiusd/raddb/sql/mysql-dialup.conf,v
retrieving revision 1.1
diff -u -r1.1 mysql-dialup.conf
--- raddb/sql/mysql-dialup.conf 31 Aug 2006 22:10:41 -0000 1.1
+++ raddb/sql/mysql-dialup.conf 30 May 2007 06:04:52 -0000
@@ -132,26 +132,108 @@
# (alternate in case first query doesn't
# affect any existing rows in the table)
#######################################################################
- accounting_onoff_query = "UPDATE ${acct_table1} SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = %{Acct-Delay-Time:-0} WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'"
-
- accounting_update_query = "UPDATE ${acct_table1} \
- SET FramedIPAddress = '%{Framed-IP-Address}', \
- AcctSessionTime = '%{Acct-Session-Time}', \
- AcctInputOctets = '%{Acct-Input-Octets}', \
- AcctOutputOctets = '%{Acct-Output-Octets}' \
+ accounting_onoff_query = "\
+ UPDATE ${acct_table1} \
+ SET \
+ AcctStopTime = '%S', \
+ AcctSessionTime = unix_timestamp('%S') - unix_timestamp(AcctStartTime), \
+ AcctTerminateCause = '%{Acct-Terminate-Cause}', \
+ AcctStopDelay = %{Acct-Delay-Time:-0} \
+ WHERE AcctSessionTime = 0 \
+ AND AcctStopTime = 0 \
+ AND NASIPAddress = '%{NAS-IP-Address}' \
+ AND AcctStartTime <= '%S'"
+
+ accounting_update_query = " \
+ UPDATE ${acct_table1} \
+ SET \
+ FramedIPAddress = '%{Framed-IP-Address}', \
+ AcctSessionTime = '%{Acct-Session-Time}', \
+ AcctInputOctets = '%{Acct-Input-Gigawords:-0}' << 32 | '%{Acct-Input-Octets:-0}', \
+ AcctOutputOctets = '%{Acct-Output-Gigawords:-0}' << 32 | '%{Acct-Output-Octets:-0}' \
WHERE AcctSessionId = '%{Acct-Session-Id}' \
- AND UserName = '%{SQL-User-Name}' \
- AND NASIPAddress= '%{NAS-IP-Address}'"
-
- accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0')"
-
- accounting_start_query = "INSERT into ${acct_table1} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time:-0}', '0')"
-
- accounting_start_query_alt = "UPDATE ${acct_table1} SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time:-0}', ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'"
-
- accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time:-0}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'"
+ AND UserName = '%{SQL-User-Name}' \
+ AND NASIPAddress = '%{NAS-IP-Address}'"
- accounting_stop_query_alt = "INSERT into ${acct_table2} (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time:-0}')"
+ accounting_update_query_alt = " \
+ INSERT INTO ${acct_table1} \
+ (AcctSessionId, AcctUniqueId, UserName, \
+ Realm, NASIPAddress, NASPortId, \
+ NASPortType, AcctStartTime, AcctSessionTime, \
+ AcctAuthentic, ConnectInfo_start, AcctInputOctets, \
+ AcctOutputOctets, CalledStationId, CallingStationId, \
+ ServiceType, FramedProtocol, FramedIPAddress, \
+ AcctStartDelay) \
+ VALUES \
+ ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', \
+ '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
+ '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', \
+ '%{Acct-Authentic}', '', '%{Acct-Input-Gigawords:-0}' << 32 | '%{Acct-Input-Octets:-0}', \
+ '%{Acct-Output-Gigawords:-0}' << 32 | '%{Acct-Output-Octets:-0}', '%{Called-Station-Id}', '%{Calling-Station-Id}', \
+ '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
+ '0')"
+
+ accounting_start_query = " \
+ INSERT INTO ${acct_table1} \
+ (AcctSessionId, AcctUniqueId, UserName, \
+ Realm, NASIPAddress, NASPortId, \
+ NASPortType, AcctStartTime, AcctStopTime, \
+ AcctSessionTime, AcctAuthentic, ConnectInfo_start, \
+ ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, \
+ CalledStationId, CallingStationId, AcctTerminateCause, \
+ ServiceType, FramedProtocol, FramedIPAddress, \
+ AcctStartDelay, AcctStopDelay) \
+ VALUES \
+ ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', \
+ '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
+ '%{NAS-Port-Type}', '%S', '0', \
+ '0', '%{Acct-Authentic}', '%{Connect-Info}', \
+ '', '0', '0', \
+ '%{Called-Station-Id}', '%{Calling-Station-Id}', '', \
+ '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
+ '%{Acct-Delay-Time:-0}', '0')"
+
+ accounting_start_query_alt = " \
+ UPDATE ${acct_table1} SET \
+ AcctStartTime = '%S', \
+ AcctStartDelay = '%{Acct-Delay-Time:-0}', \
+ ConnectInfo_start = '%{Connect-Info}' \
+ WHERE AcctSessionId = '%{Acct-Session-Id}' \
+ AND UserName = '%{SQL-User-Name}' \
+ AND NASIPAddress = '%{NAS-IP-Address}'"
+
+ accounting_stop_query = " \
+ UPDATE ${acct_table2} SET \
+ AcctStopTime = '%S', \
+ AcctSessionTime = '%{Acct-Session-Time}', \
+ AcctInputOctets = '%{Acct-Input-Gigawords:-0}' << 32 | '%{Acct-Input-Octets:-0}', \
+ AcctOutputOctets = '%{Acct-Output-Gigawords:-0}' << 32 | '%{Acct-Output-Octets:-0}', \
+ AcctTerminateCause = '%{Acct-Terminate-Cause}', \
+ AcctStopDelay = '%{Acct-Delay-Time:-0}', \
+ ConnectInfo_stop = '%{Connect-Info}' \
+ WHERE AcctSessionId = '%{Acct-Session-Id}' \
+ AND UserName = '%{SQL-User-Name}' \
+ AND NASIPAddress = '%{NAS-IP-Address}'"
+
+ accounting_stop_query_alt = " \
+ INSERT INTO ${acct_table2} \
+ (AcctSessionId, AcctUniqueId, UserName, \
+ Realm, NASIPAddress, NASPortId, \
+ NASPortType, AcctStartTime, AcctStopTime, \
+ AcctSessionTime, AcctAuthentic, ConnectInfo_start, \
+ ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, \
+ CalledStationId, CallingStationId, AcctTerminateCause, \
+ ServiceType, FramedProtocol, FramedIPAddress, \
+ AcctStartDelay, AcctStopDelay) \
+ VALUES \
+ ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', \
+ '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
+ '%{NAS-Port-Type}', DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}) SECOND), '%S', \
+ '%{Acct-Session-Time}', '%{Acct-Authentic}', '', \
+ '%{Connect-Info}', '%{Acct-Input-Gigawords:-0}' << 32 | '%{Acct-Input-Octets:-0}', '%{Acct-Output-Gigawords:-0}' << 32 | '%{Acct-Output-Octets:-0}', \
+ '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', \
+ '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
+ '0', '%{Acct-Delay-Time:-0}')"
#######################################################################
# Simultaneous Use Checking Queries
@@ -165,8 +247,15 @@
#######################################################################
# Uncomment simul_count_query to enable simultaneous use checking
- # simul_count_query = "SELECT COUNT(*) FROM ${acct_table1} WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0"
- simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol FROM ${acct_table1} WHERE UserName='%{SQL-User-Name}' AND AcctStopTime = 0"
+ # simul_count_query = "SELECT COUNT(*) \
+ # FROM ${acct_table1} \
+ # WHERE UserName='%{SQL-User-Name}' \
+ # AND AcctStopTime = 0"
+
+ simul_verify_query = "SELECT RadAcctId, AcctSessionId, UserName, NASIPAddress, NASPortId, FramedIPAddress, CallingStationId, FramedProtocol \
+ FROM ${acct_table1} \
+ WHERE UserName='%{SQL-User-Name}' \
+ AND AcctStopTime = 0"
#######################################################################
# Authentication Logging Queries
@@ -174,5 +263,6 @@
# postauth_query - Insert some info after authentication
#######################################################################
- postauth_query = "INSERT into ${postauth_table} (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', '%S')"
+ postauth_query = "INSERT INTO ${postauth_table} (id, user, pass, reply, date) \
+ VALUES ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', '%S')"
-------------- 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-devel/attachments/20070530/beb2c1fa/attachment.pgp>
More information about the Freeradius-Devel
mailing list