1717# Use Stripped-User-Name, if it's there.
1818# Else use User-Name, if it's there,
1919# Else use hard-coded string "DEFAULT" as the user name.
20- #sql_user_name = "%{& Stripped-User-Name || & User-Name || 'DEFAULT'}"
20+ #sql_user_name = "%{Stripped-User-Name || User-Name || 'DEFAULT'}"
2121#
2222sql_user_name = "%{User-Name}"
2323
@@ -33,7 +33,7 @@ sql_user_name = "%{User-Name}"
3333# distrust the provided Event-Timestamp.
3434#event_timestamp_epoch = "%l"
3535
36- event_timestamp_epoch = "%{((integer) & Event-Timestamp) || %l}"
36+ event_timestamp_epoch = "%{((integer) Event-Timestamp) || %l}"
3737
3838# event_timestamp is the SQL snippet for converting an epoch timestamp
3939# to an SQL date.
@@ -137,7 +137,7 @@ accounting {
137137 SET \
138138 acctstoptime = ${...event_timestamp}, \
139139 acctsessiontime = DATEDIFF(second, acctstarttime, '${...event_timestamp}'), \
140- acctterminatecause = '%{& Acct-Terminate-Cause || 'NAS-Reboot'}' \
140+ acctterminatecause = '%{Acct-Terminate-Cause || 'NAS-Reboot'}' \
141141 WHERE acctstoptime IS NULL \
142142 AND nasipaddress = '%{NAS-IP-Address}' \
143143 AND acctstarttime <= ${...event_timestamp}"
@@ -191,7 +191,7 @@ accounting {
191191 '%{SQL-User-Name}', \
192192 '%{Realm}', \
193193 '%{NAS-IP-Address}', \
194- '%{& NAS-Port-ID || & NAS-Port}', \
194+ '%{NAS-Port-ID || NAS-Port}', \
195195 '%{NAS-Port-Type}', \
196196 ${...event_timestamp}, \
197197 ${...event_timestamp}, \
@@ -243,9 +243,9 @@ accounting {
243243 framedipv6prefix = '%{Framed-IPv6-Prefix}', \
244244 framedinterfaceid = '%{Framed-Interface-Id}', \
245245 delegatedipv6prefix = '%{Delegated-IPv6-Prefix}', \
246- acctsessiontime = %{& Acct-Session-Time || 'NULL'}, \
247- acctinputoctets = %{(((uint64) & Acct-Input-Gigawords) << 32) | (uint64) & Acct-Input-Octets}, \
248- acctoutputoctets = %{(((uint64) & Acct-Output-Gigawords) << 32) | (uint64) & Acct-Output-Octets}, \
246+ acctsessiontime = %{Acct-Session-Time || 'NULL'}, \
247+ acctinputoctets = %{(((uint64) Acct-Input-Gigawords) << 32) | (uint64) Acct-Input-Octets}, \
248+ acctoutputoctets = %{(((uint64) Acct-Output-Gigawords) << 32) | (uint64) Acct-Output-Octets}, \
249249 class = '%{Class}' \
250250 WHERE acctuniqueid = '%{Acct-Unique-Session-Id}'"
251251
@@ -262,17 +262,17 @@ accounting {
262262 '%{SQL-User-Name}', \
263263 '%{Realm}', \
264264 '%{NAS-IP-Address}', \
265- '%{& NAS-Port-ID || & NAS-Port}', \
265+ '%{NAS-Port-ID || NAS-Port}', \
266266 '%{NAS-Port-Type}', \
267- DATEADD((${...event_timestamp_epoch} - %{& Acct-Session-Time || 0}) SECOND TO TIMESTAMP '1970-01-01 00:00:00'), \
267+ DATEADD((${...event_timestamp_epoch} - %{Acct-Session-Time || 0}) SECOND TO TIMESTAMP '1970-01-01 00:00:00'), \
268268 ${...event_timestamp}, \
269269 NULL, \
270- %{& Acct-Session-Time || 'NULL'}, \
270+ %{Acct-Session-Time || 'NULL'}, \
271271 '%{Acct-Authentic}', \
272272 '%{Connect-Info}', \
273273 '', \
274- '%{(((uint64) & Acct-Input-Gigawords) << 32) | (uint64) & Acct-Input-Octets}', \
275- '%{(((uint64) & Acct-Output-Gigawords) << 32) | (uint64) & Acct-Output-Octets}', \
274+ '%{(((uint64) Acct-Input-Gigawords) << 32) | (uint64) Acct-Input-Octets}', \
275+ '%{(((uint64) Acct-Output-Gigawords) << 32) | (uint64) Acct-Output-Octets}', \
276276 '%{Called-Station-Id}', \
277277 '%{Calling-Station-Id}', \
278278 '', \
@@ -293,9 +293,9 @@ accounting {
293293 query = "\
294294 UPDATE ${...acct_table2} SET \
295295 acctstoptime = ${...event_timestamp}, \
296- acctsessiontime = %{& Acct-Session-Time || 'NULL'}, \
297- acctinputoctets = '%{(((uint64) & Acct-Input-Gigawords) << 32) | (uint64) & Acct-Input-Octets}', \
298- acctoutputoctets = '%{(((uint64) & Acct-Output-Gigawords) << 32) | (uint64) & Acct-Output-Octets}', \
296+ acctsessiontime = %{Acct-Session-Time || 'NULL'}, \
297+ acctinputoctets = '%{(((uint64) Acct-Input-Gigawords) << 32) | (uint64) Acct-Input-Octets}', \
298+ acctoutputoctets = '%{(((uint64) Acct-Output-Gigawords) << 32) | (uint64) Acct-Output-Octets}', \
299299 acctterminatecause = '%{Acct-Terminate-Cause}', \
300300 connectinfo_stop = '%{Connect-Info}', \
301301 class = '%{Class}' \
@@ -314,17 +314,17 @@ accounting {
314314 '%{SQL-User-Name}', \
315315 '%{Realm}', \
316316 '%{NAS-IP-Address}', \
317- '%{& NAS-Port-ID || & NAS-Port}', \
317+ '%{NAS-Port-ID || NAS-Port}', \
318318 '%{NAS-Port-Type}', \
319- DATEADD((${...event_timestamp_epoch} - %{& Acct-Session-Time || 0}) SECOND TO TIMESTAMP '1970-01-01 00:00:00'), \
319+ DATEADD((${...event_timestamp_epoch} - %{Acct-Session-Time || 0}) SECOND TO TIMESTAMP '1970-01-01 00:00:00'), \
320320 ${...event_timestamp}, \
321321 ${...event_timestamp}, \
322- %{& Acct-Session-Time || 'NULL'}, \
322+ %{Acct-Session-Time || 'NULL'}, \
323323 '%{Acct-Authentic}', \
324324 '', \
325325 '%{Connect-Info}', \
326- '%{(((uint64) & Acct-Input-Gigawords) << 32) | (uint64) & Acct-Input-Octets}', \
327- '%{(((uint64) & Acct-Output-Gigawords) << 32) | (uint64) & Acct-Output-Octets}', \
326+ '%{(((uint64) Acct-Input-Gigawords) << 32) | (uint64) Acct-Input-Octets}', \
327+ '%{(((uint64) Acct-Output-Gigawords) << 32) | (uint64) Acct-Output-Octets}', \
328328 '%{Called-Station-Id}', \
329329 '%{Calling-Station-Id}', \
330330 '%{Acct-Terminate-Cause}', \
@@ -357,7 +357,7 @@ send {
357357 (username, pass, reply, authdate, class) \
358358 VALUES ( \
359359 '%{SQL-User-Name}', \
360- '%{& User-Password || & Chap-Password}', \
360+ '%{User-Password || Chap-Password}', \
361361 '%{reply.Packet-Type}', \
362362 '%S.%M', \
363363 '%{reply.Class}')"
0 commit comments