Reverse string concatenation for multiple attributes

Franks Andy (IT Technical Architecture Manager) Andy.Franks at sath.nhs.uk
Fri Dec 11 17:09:43 CET 2015


Hi. Maybe spoke too soon..
Any chance this crash is not something I have done?
thanks
Andy 

(0)         EXPAND call get_active_sessions_for_switchport ('%{NAS-IP-Address}', '%{NAS-Port}', 864000)
(0)            --> call get_active_sessions_for_switchport ('192.168.105.86', '2', 864000)
(0)         Tmp-String-0 := "call get_active_sessions_for_switchport ('192.168.105.86', '2', 864000)"
(0)       } # update control = noop
(0)       map sql_SP_rsh-radius-lant &control:Tmp-String-0 {
rlm_sql (sql_SP_rsh-radius-lant): 0 of 0 connections in use.  You  may need to increase "spare"
rlm_sql (sql_SP_rsh-radius-lant): Opening additional connection (0), 1 of 10 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'radius' on rsh-radius-sql via TCP/IP, server version 5.5.31-0ubuntu0.13.04.1, protocol version 10
rlm_sql (sql_SP_rsh-radius-lant): Reserved connection (0)
(0)         Executing select query: call get_active_sessions_for_switchport ('192.168.105.86', '2', 864000)
Program received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  0x00007ffff08fcce0 in mysql_num_fields () from /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
#1  0x00007ffff0dfdf0c in sql_fields (out=0x7fffffffc3c0, handle=0xd48e20, config=0xb3d1c0) at src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c:444
#2  0x00007ffff10046bc in mod_map_proc (mod_inst=0xb3d1c0, proc_inst=0x0, request=0xd03880, query=0xd537d0 "call get_active_sessions_for_switchport ('192.168.105.86', '2', 864000)", maps=0xcc19b0) at src/modules/rlm_sql/rlm_sql.c:332
#3  0x00007ffff7bac416 in map_proc (request=0xd03880, inst=0xcc2310) at src/main/map_proc.c:234
#4  0x000000000042b1d7 in modcall_recurse (request=0xd03880, component=MOD_AUTHORIZE, depth=2, entry=0x7fffffffd870, do_next_sibling=true) at src/main/modcall.c:649
#5  0x000000000042a86c in modcall_child (request=0xd03880, component=MOD_AUTHORIZE, depth=2, entry=0x7fffffffd858, c=0xcc1770, result=0x7fffffffcc40, do_next_sibling=true) at src/main/modcall.c:434
#6  0x000000000042ba7a in modcall_recurse (request=0xd03880, component=MOD_AUTHORIZE, depth=1, entry=0x7fffffffd858, do_next_sibling=true) at src/main/modcall.c:834
#7  0x000000000042a86c in modcall_child (request=0xd03880, component=MOD_AUTHORIZE, depth=1, entry=0x7fffffffd840, c=0xca31a0, result=0x7fffffffd280, do_next_sibling=true) at src/main/modcall.c:434
#8  0x000000000042ba7a in modcall_recurse (request=0xd03880, component=MOD_AUTHORIZE, depth=0, entry=0x7fffffffd840, do_next_sibling=true) at src/main/modcall.c:834
#9  0x000000000042c8e2 in modcall (component=MOD_AUTHORIZE, c=0xca30b0, request=0xd03880) at src/main/modcall.c:1179
#10 0x0000000000427be8 in indexed_modcall (comp=MOD_AUTHORIZE, idx=0, request=0xd03880) at src/main/modules.c:956
#11 0x0000000000429f86 in process_authorize (autz_type=0, request=0xd03880) at src/main/modules.c:2091
#12 0x000000000040fbd7 in rad_authenticate (request=0xd03880) at src/main/auth.c:435
#13 0x000000000043bf64 in request_running (request=0xd03880, action=1) at src/main/process.c:1482
#14 0x000000000043ac6a in request_queue_or_run (request=0xd03880, process=0x43be02 <request_running>) at src/main/process.c:953
#15 0x000000000043c86c in request_receive (ctx=0xd03590, listener=0xae72f0, packet=0xd035f0, client=0xacb540, fun=0x40f934 <rad_authenticate>) at src/main/process.c:1740
#16 0x0000000000419bd7 in auth_socket_recv (listener=0xae72f0) at src/main/listen.c:1901
#17 0x0000000000443a50 in event_socket_handler (xel=0xcf55f0, fd=12, ctx=0xae72f0) at src/main/process.c:4544
#18 0x00007ffff7974d6e in fr_event_loop (el=0xcf55f0) at src/lib/event.c:637
#19 0x0000000000445925 in radius_event_process () at src/main/process.c:5587
#20 0x00000000004339a6 in main (argc=2, argv=0x7fffffffe6d8) at src/main/radiusd.c:578



-----Original Message-----
From: Freeradius-Users [mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradius.org] On Behalf Of Arran Cudbard-Bell
Sent: 10 December 2015 22:15
To: FreeRadius users mailing list
Subject: Re: Reverse string concatenation for multiple attributes


> On 10 Dec 2015, at 16:47, Franks Andy (IT Technical Architecture Manager) <Andy.Franks at sath.nhs.uk> wrote:
> 
> Awesome, it works! Thanks devs. Everytime I play with FR I learn something new!

No problem :)

and it's more, every time you come back to FreeRADIUS we've added something new ;)  Both those features were added this year.  One of the benefits of building from the v3.1.x branch.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org> FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2




More information about the Freeradius-Users mailing list