Hi, I have freeradius 2.1.10 running with static IP clients, configure it myself, but now I need a range of dynamic ips. I have read that to do this, I have to install with the - with-dhcp, but if you have already installed and do not have the installation package, as I can configure the dhcp? At moment, I don't want to use a database My system is Debian 2.6.32-38 I hope that you understand me, my English is not too good thanks LAURA MARZÀ PORCAR Administración de Sistemas Departamento UUTT 964.722.633 - ext. 741 MARINA D'OR - España laura.marza@servidir.es http://www.marinador.com Soporte: http://soporte.marinador.com
Laura Marzà Porcar wrote:
Hi, I have freeradius 2.1.10 running with static IP clients, configure it myself, but now I need a range of dynamic ips. I have read that to do this, I have to install with the - with-dhcp, but if you have already installed and do not have the installation package, as I can configure the dhcp?
You have to install the server from source. I suggest using the latest version, 2.2.3. Alan DeKok.
Thanks Alan, Then there will be two different instances of the application or the application will be updated? LAURA MARZÀ PORCAR Administración de Sistemas Departamento UUTT 964.722.633 - ext. 741 MARINA D'OR - España laura.marza@servidir.es http://www.marinador.com Soporte: http://soporte.marinador.com -----Mensaje original----- De: freeradius-users-bounces+laura.marza=servidir.es@lists.freeradius.org [mailto:freeradius-users-bounces+laura.marza=servidir.es@lists.freeradius.org] En nombre de Alan DeKok Enviado el: jueves, 19 de diciembre de 2013 16:28 Para: FreeRadius users mailing list Asunto: Re: DHCP Laura Marzà Porcar wrote:
Hi, I have freeradius 2.1.10 running with static IP clients, configure it myself, but now I need a range of dynamic ips. I have read that to do this, I have to install with the - with-dhcp, but if you have already installed and do not have the installation package, as I can configure the dhcp?
You have to install the server from source. I suggest using the latest version, 2.2.3. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Good morning Alan, I have the server in production and I want to do things carefully. While I understand that your role is not to teach this me, but I appreciate if you check what I'll do. My distribution is debían and I have the following packages installed: /var/cache/apt/archives/freeradius_2.1.10+dfsg-2+squeeze1_i386.deb /var/cache/apt/archives/freeradius-common_2.1.10+dfsg-2+squeeze1_all.deb /var/cache/apt/archives/libfreeradius2_2.1.10+dfsg-2+squeeze1_i386.deb /var/cache/apt/archives/freeradius-utils_2.1.10+dfsg-2+squeeze1_i386.deb The packages that are installed on the server are: freeradius install freeradius-common install freeradius-utils install libfreeradius2 install libfreetype6 install I should do: - First, I've copied the entire folder /etc/freeradius in another folder for saving my configuration - I've to download the version 2.2.3 (wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.2.3.tar.gz) - dpkg -r (for each. deb?) - move to the new folder created freeradius-server-2.2.3 and ./configure --with-dhcp Tx! LAURA MARZÀ PORCAR Administración de Sistemas Departamento UUTT 964.722.633 - ext. 741 MARINA D'OR - España laura.marza@servidir.es http://www.marinador.com Soporte: http://soporte.marinador.com -----Mensaje original----- De: freeradius-users-bounces+laura.marza=servidir.es@lists.freeradius.org [mailto:freeradius-users-bounces+laura.marza=servidir.es@lists.freeradius.org] En nombre de Alan DeKok Enviado el: viernes, 20 de diciembre de 2013 22:50 Para: FreeRadius users mailing list Asunto: Re: DHCP Laura Marzà Porcar wrote:
Thanks Alan, Then there will be two different instances of the application or the application will be updated?
You will need to re-install everything. Uninstall the RPM. You can't have two versions of FreeRADIUS on the same machine. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
rlm_perl add incorrect AVP while receiving acct-packet with VSA. device which sending radius packet use eltex dictionary (dictionary.eltex) --------------------------------------------------------- VENDOR Eltex 35265 BEGIN-VENDOR Eltex ATTRIBUTE Eltex-AVPair 1 string ATTRIBUTE Incoming-SIP-call-id 2 string ATTRIBUTE Outgoing-SIP-call-id 3 string ATTRIBUTE Incoming-RTP-local-address 4 ipaddr ATTRIBUTE Incoming-RTP-remote-address 5 ipaddr ATTRIBUTE Outgoing-RTP-local-address 6 ipaddr ATTRIBUTE Outgoing-RTP-remote-address 7 ipaddr ATTRIBUTE Disconnect-Code-Local 11 integer END-VENDOR Eltex ----------------------------------------------------------- in debug i see good packet received by radius: rad_recv: Accounting-Request packet from host 192.168.243.243 port 44825, id=109, length=997 Acct-Status-Type = Stop User-Name = "123456" Calling-Station-Id = "123456" Called-Station-Id = "89121223456" Acct-Session-Id = "1100037f 52d7b893 6f9a90c4 240760f0" Event-Timestamp = "Jan 16 2014 16:46:55 YEKT" NAS-Port = 285213567 NAS-Port-Type = Async Cisco-NAS-Port = "SIPT:037f" Cisco-AVPair = "xpgk-src-number-in=123456" Cisco-AVPair = "xpgk-src-number-out=83512123456" Cisco-AVPair = "xpgk-dst-number-in=89121223456" Cisco-AVPair = "xpgk-dst-number-out=89121223456" Cisco-AVPair = "xpgk-route-retries=1" Cisco-AVPair = "h323-remote-id=TRUNK_MTT" Cisco-AVPair = "h323-call-id=1100037f 52d7b893 6f9a90c4 240760f0" h323-remote-address = "10.75.130.154" Cisco-AVPair = "h323-incoming-conf-id=1100037f 52d7b893 6f9a90c4 240760f0" h323-conf-id = "1100037f 52d7b893 6f9a90c4 240760f0" h323-setup-time = "16:46:43.000 GMT+6 Thu Jan 16 2014" h323-call-origin = "originate" h323-call-type = "VoIP" h323-connect-time = "16:46:54.000 GMT+6 Thu Jan 16 2014" h323-disconnect-time = "16:46:55.000 GMT+6 Thu Jan 16 2014" h323-disconnect-cause = "10" Cisco-AVPair = "xpgk-local-disconnect-cause=1" Acct-Session-Time = 1 Eltex-AVPair = "session-time=1" Acct-Delay-Time = 5 Incoming-SIP-call-id = "db876304-9012337d@192.168.243.86" Eltex-AVPair = "Incoming-codec=G711.A" Incoming-RTP-local-address = 172.16.0.227 Incoming-RTP-remote-address = 192.168.243.86 Outgoing-SIP-call-id = "1389-869203-968339" Eltex-AVPair = "Outgoing-codec=G711.A" Outgoing-RTP-local-address = 172.16.0.227 Outgoing-RTP-remote-address = 10.75.130.154 NAS-IP-Address = 192.168.243.243 Cisco-AVPair = "h323-gw-address=192.168.243.243" h323-gw-id = "192.168.243.243" All VSA for Eltex in vendor's packet are: Incoming-SIP-call-id = "db876304-9012337d@192.168.243.86" Eltex-AVPair = "Incoming-codec=G711.A" Incoming-RTP-local-address = 172.16.0.227 Incoming-RTP-remote-address = 192.168.243.86 Outgoing-SIP-call-id = "1389-869203-968339" Eltex-AVPair = "Outgoing-codec=G711.A" Outgoing-RTP-local-address = 172.16.0.227 Outgoing-RTP-remote-address = 10.75.130.154 when rlm_perl used in preacc section debug show: Thu Jan 16 17:41:05 2014 : Info: # Executing section preacct from file /etc/freeradius/sites-enabled/default Thu Jan 16 17:41:05 2014 : Info: +- entering group preacct {...} Thu Jan 16 17:41:05 2014 : Info: ++[preprocess] returns ok Thu Jan 16 17:41:05 2014 : Info: [acct_unique] Hashing 'NAS-Port = 285213567,Client-IP-Address = 192.168.243.243,NAS-IP-Address = 192.168.243.24 3,Acct-Session-Id = "1100037f 52d7b893 6f9a90c4 240760f0",User-Name = "123456"' Thu Jan 16 17:41:05 2014 : Info: [acct_unique] Acct-Unique-Session-ID = "68185495bd67a53b". Thu Jan 16 17:41:05 2014 : Info: ++[acct_unique] returns ok Thu Jan 16 17:41:05 2014 : Info: [suffix] No '@' in User-Name = "123456", looking up realm NULL Thu Jan 16 17:41:05 2014 : Info: [suffix] No such realm "NULL" Thu Jan 16 17:41:05 2014 : Info: ++[suffix] returns noop Thu Jan 16 17:41:05 2014 : Info: ++[files] returns noop Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair NAS-Port-Type = Async Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.86 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1389-869203-968339 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-gw-id = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Acct-Unique-Session-Id = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Called-Station-Id = 89121223456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-call-type = VoIP Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-call-origin = originate Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = session-time=1 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 5 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = db876304-9012337d@192.168.243.86 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = Incoming-codec=G711.A Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 192.168.243.86 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 1389-869203-968339 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = Outgoing-codec=G711.A Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Acct-Status-Type = Stop Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair NAS-IP-Address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-disconnect-cause = 10 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Acct-Session-Time = 1 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-incoming-conf-id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair User-Name = 123456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 1389-869203-968339 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair SIP-AVP = callernum:123456;calleenum:89121223456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Acct-Session-Id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-connect-time = 16:46:54.000 GMT+6 Thu Jan 16 2014 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-local-address = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-local-address = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-local-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-local-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Outgoing-RTP-local-address = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Outgoing-RTP-local-address = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-setup-time = 16:46:43.000 GMT+6 Thu Jan 16 2014 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-NAS-Port = SIPT:037f Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-conf-id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-remote-address = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-remote-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-remote-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Outgoing-RTP-remote-address = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Outgoing-RTP-remote-address = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = db876304-9012337d@192.168.243.86 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 192.168.243.86 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 1389-869203-968339 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Calling-Station-Id = 123456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-disconnect-time = 16:46:55.000 GMT+6 Thu Jan 16 2014 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-src-number-in=123456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-src-number-out=83512123456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-dst-number-in=89121223456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-dst-number-out=89121223456 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-route-retries=1 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-remote-id=TRUNK_MTT Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-call-id=1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-incoming-conf-id=1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-local-disconnect-cause=1 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-gw-address=192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair h323-remote-address = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Event-Timestamp = Jan 16 2014 16:46:55 YEKT Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair NAS-Port = 285213567 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Acct-Delay-Time = 5 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 192.168.243.86 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-local-address = 1389-869203-968339 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 172.16.0.227 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 10.75.130.154 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 192.168.243.243 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-local-address = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-local-address = 68185495bd67a53b Thu Jan 16 17:41:05 2014 : Info: ++[perl] returns ok i.e. all VSA get more then one values. e.g., Outgoing-SIP-call-id: Outgoing-SIP-call-id = 1389-869203-968339 Outgoing-SIP-call-id = 172.16.0.227 Outgoing-SIP-call-id = 10.75.130.154 Outgoing-SIP-call-id = 192.168.243.243 Outgoing-SIP-call-id = 192.168.243.243 Outgoing-SIP-call-id = 1100037f 52d7b893 6f9a90c4 240760f0 Outgoing-SIP-call-id = 68185495bd67a53b All others VSA is broked also. I dump Accounting-Request packet in text file and "send" it via radclient $ cat pak | radclient localhost acct secret I got the same corruption. BUT!!!! When i change vendor id in dictionary file VENDOR Eltex 35265 to VENDOR Eltex 5265 rlm_perl works fine! Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair NAS-Port-Type = Async Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.86 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-gw-id = 192.168.243.243 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Acct-Unique-Session-Id = 68185495bd67a53b Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Called-Station-Id = 89121223456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-call-type = VoIP Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-call-origin = originate Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = session-time=1 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = Incoming-codec=G711.A Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Eltex-AVPair = Outgoing-codec=G711.A Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Acct-Status-Type = Stop Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair NAS-IP-Address = 192.168.243.243 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-disconnect-cause = 10 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Acct-Session-Time = 1 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-incoming-conf-id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair User-Name = 123456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 1389-869203-968339 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair SIP-AVP = callernum:123456;calleenum:89121223456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Acct-Session-Id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-connect-time = 16:46:54.000 GMT+6 Thu Jan 16 2014 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-local-address = 172.16.0.227 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-setup-time = 16:46:43.000 GMT+6 Thu Jan 16 2014 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-NAS-Port = SIPT:037f Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-conf-id = 1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Outgoing-RTP-remote-address = 10.75.130.154 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Incoming-SIP-call-id = db876304-9012337d@192.168.243.86 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Calling-Station-Id = 123456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-disconnect-time = 16:46:55.000 GMT+6 Thu Jan 16 2014 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-src-number-in=123456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-src-number-out=83512123456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-dst-number-in=89121223456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-dst-number-out=89121223456 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-route-retries=1 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-remote-id=TRUNK_MTT Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-call-id=1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-incoming-conf-id=1100037f 52d7b893 6f9a90c4 240760f0 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = xpgk-local-disconnect-cause=1 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Cisco-AVPair = h323-gw-address=192.168.243.243 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair h323-remote-address = 10.75.130.154 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Event-Timestamp = Jan 16 2014 16:46:55 YEKT Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair NAS-Port = 285213567 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Acct-Delay-Time = 5 Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Incoming-RTP-local-address = 172.16.0.227 only one line Thu Jan 16 18:14:21 2014 : Debug: rlm_perl: Added pair Outgoing-SIP-call-id = 1389-869203-968339 what is wrong? where is bug? Best regards, Michael
magmike@mail.ru wrote:
rlm_perl add incorrect AVP while receiving acct-packet with VSA.
OK...
in debug i see good packet received by radius: rad_recv: Accounting-Request packet from host 192.168.243.243 port 44825, id=109, length=997 ... Cisco-AVPair = "h323-incoming-conf-id=1100037f 52d7b893 6f9a90c4 240760f0"
Which comes up later:
Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1100037f 52d7b893 6f9a90c4 240760f0
Somehow the Cisco attributes are getting confused with the Eltex ones. Go to raddb/modules/preprocess, and set: with_cisco_vsa_hack = no That should fix it. Alan DeKok.
Thank you for reply Alan unfortunately, did not help debug output ... Thu Jan 16 22:07:51 2014 : Debug: preprocess { Thu Jan 16 22:07:51 2014 : Debug: huntgroups = "/etc/freeradius/huntgroups" Thu Jan 16 22:07:51 2014 : Debug: hints = "/etc/freeradius/hints" Thu Jan 16 22:07:51 2014 : Debug: with_ascend_hack = no Thu Jan 16 22:07:51 2014 : Debug: ascend_channels_per_line = 23 Thu Jan 16 22:07:51 2014 : Debug: with_ntdomain_hack = no Thu Jan 16 22:07:51 2014 : Debug: with_specialix_jetstream_hack = no Thu Jan 16 22:07:51 2014 : Debug: with_cisco_vsa_hack = no Thu Jan 16 22:07:51 2014 : Debug: with_alvarion_vsa_hack = no Thu Jan 16 22:07:51 2014 : Debug: } ...
rlm_perl add incorrect AVP while receiving acct-packet with VSA.
OK...
in debug i see good packet received by radius: rad_recv: Accounting-Request packet from host 192.168.243.243 port 44825, id=109, length=997 ... Cisco-AVPair = "h323-incoming-conf-id=1100037f 52d7b893 6f9a90c4 240760f0"
Which comes up later:
Thu Jan 16 17:41:05 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1100037f 52d7b893 6f9a90c4 240760f0
Somehow the Cisco attributes are getting confused with the Eltex ones.
Cisco attributes is not cause. also there is few attibutes with value contain "1100037f 52d7b893 6f9a90c4 240760f0" this is normal: Acct-Session-Id = "1100037f 52d7b893 6f9a90c4 240760f0" Cisco-AVPair = "h323-call-id=1100037f 52d7b893 6f9a90c4 240760f0" Cisco-AVPair = "h323-incoming-conf-id=1100037f 52d7b893 6f9a90c4 240760f0" h323-conf-id = "1100037f 52d7b893 6f9a90c4 240760f0" There is the only AVP Incoming-RTP-remote-address in packet before rlm_perl: Incoming-RTP-remote-address = 192.168.243.86 But rlm_perl try to add other values. Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.86 Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1389-869203-968339 Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 172.16.0.227 Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 10.75.130.154 Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 Thu Jan 16 22:07:53 2014 : Debug: rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 68185495bd67a53b Errors arise because Incoming-RTP-remote-address described as ipaddr in dictionary Please pay attention all works fine when i use VENDOR id less or equal 32767 (0x7fff) Error occured with VENDOR ID greater of 32767 There are the only vendor id greater then 32767 in freeradius dictionaries: $ grep "^VENDOR" /usr/share/freeradius/dictionary.* | awk '($3>32767){print}' /usr/share/freeradius/dictionary.eltex:VENDOR Eltex 35265 RFC 2865 says: Vendor-Id The high-order octet is 0 and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the "Assigned Numbers" RFC [6]. so 35265 is less then 0xffffff. i think something wrong in rlm_perl.
Go to raddb/modules/preprocess, and set:
with_cisco_vsa_hack = no
That should fix it.
magmike@mail.ru wrote:
Thank you for reply Alan
unfortunately, did not help
Well, that's life.
Please pay attention all works fine when i use VENDOR id less or equal 32767 (0x7fff) Error occured with VENDOR ID greater of 32767
Upgrade. That issue has been fixed for almost 5 years now. ... commit 92e0d149bd40cf1e1a58298926d16c26ba51fdd8 Author: Alan T. DeKok <aland@freeradius.org> Date: Wed Aug 12 11:12:49 2009 +0200 Remove final restrictions on attributes > 32767 ... If you're running a 5 year-old version of the server, you really need to upgrade. Alan DeKok.
Please pay attention all works fine when i use VENDOR id less or equal 32767 (0x7fff) Error occured with VENDOR ID greater of 32767
Upgrade. That issue has been fixed for almost 5 years now.
... commit 92e0d149bd40cf1e1a58298926d16c26ba51fdd8 Author: Alan T. DeKok <aland@freeradius.org> Date: Wed Aug 12 11:12:49 2009 +0200
Remove final restrictions on attributes > 32767 ...
If you're running a 5 year-old version of the server, you really need to upgrade.
i use freeradiusd 2.1.12 $ freeradius -v freeradius: FreeRADIUS Version 2.1.12, for host i486-pc-linux-gnu, built on Dec 16 2012 at 22:03:33 Best regards, Michael
magmike@mail.ru wrote:
If you're running a 5 year-old version of the server, you really need to upgrade.
i use freeradiusd 2.1.12 $ freeradius -v freeradius: FreeRADIUS Version 2.1.12, for host i486-pc-linux-gnu, built on Dec 16 2012 at 22:03:33
<shrug> It works for me with the latest release. Please try with 2.2.3. If the bug is still there, I'll look at it. Alan DeKok.
The same result on 2.2.3 rlm_perl: Connect to database established rlm_perl: Added pair NAS-Port-Type = Async rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.86 rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1389-869203-968339 rlm_perl: Added pair Incoming-RTP-remote-address = 172.16.0.227 rlm_perl: Added pair Incoming-RTP-remote-address = 10.75.130.154 rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 68185495bd67a53b rlm_perl: Added pair Incoming-RTP-remote-address = 127.0.0.1 rlm_perl: Added pair Acct-Session-Id = 1100037f 52d7b893 6f9a90c4 240760f0 rlm_perl: Added pair h323-gw-id = 192.168.243.243 rlm_perl: Added pair h323-connect-time = 16:46:54.000 GMT+6 Thu Jan 16 2014 rlm_perl: Added pair Outgoing-RTP-local-address = 172.16.0.227 rlm_perl: Added pair Outgoing-RTP-local-address = 10.75.130.154 rlm_perl: Added pair Outgoing-RTP-local-address = 192.168.243.243 rlm_perl: Added pair Outgoing-RTP-local-address = 192.168.243.243
magmike@mail.ru wrote:
If you're running a 5 year-old version of the server, you really need to upgrade.
i use freeradiusd 2.1.12 $ freeradius -v freeradius: FreeRADIUS Version 2.1.12, for host i486-pc-linux-gnu, built on Dec 16 2012 at 22:03:33
<shrug> It works for me with the latest release.
Please try with 2.2.3. If the bug is still there, I'll look at it.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 16 Jan 2014, at 19:33, magmike@mail.ru wrote:
The same result on 2.2.3
rlm_perl: Connect to database established rlm_perl: Added pair NAS-Port-Type = Async rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.86 rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 1389-869203-968339 rlm_perl: Added pair Incoming-RTP-remote-address = 172.16.0.227 rlm_perl: Added pair Incoming-RTP-remote-address = 10.75.130.154 rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 rlm_perl: Added pair Incoming-RTP-remote-address = 192.168.243.243 rlm_perl: ERROR: Failed to create pair Incoming-RTP-remote-address = 68185495bd67a53b rlm_perl: Added pair Incoming-RTP-remote-address = 127.0.0.1 rlm_perl: Added pair Acct-Session-Id = 1100037f 52d7b893 6f9a90c4 240760f0 rlm_perl: Added pair h323-gw-id = 192.168.243.243 rlm_perl: Added pair h323-connect-time = 16:46:54.000 GMT+6 Thu Jan 16 2014 rlm_perl: Added pair Outgoing-RTP-local-address = 172.16.0.227 rlm_perl: Added pair Outgoing-RTP-local-address = 10.75.130.154 rlm_perl: Added pair Outgoing-RTP-local-address = 192.168.243.243 rlm_perl: Added pair Outgoing-RTP-local-address = 192.168.243.243
Want to try 3.0.1 just for completeness :) -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Alan wrote:
magmike@mail.ru wrote:
If you're running a 5 year-old version of the server, you really need to upgrade.
i use freeradiusd 2.1.12 $ freeradius -v freeradius: FreeRADIUS Version 2.1.12, for host i486-pc-linux-gnu, built on Dec 16 2012 at 22:03:33
<shrug> It works for me with the latest release.
Please try with 2.2.3. If the bug is still there, I'll look at it.
Alan DeKok.
It's like bug in functions which use VALUE_PAIR.attribute as signed int i.e. paircopy2 from valuepair.c:359 ------------------------------------------------------------- VALUE_PAIR *paircopy2(VALUE_PAIR *vp, int attr) { VALUE_PAIR *first, *n, **last; first = NULL; last = &first; while (vp) { if (attr >= 0 && vp->attribute != attr) { vp = vp->next; continue; } ------------------------------------------------------------- Here when vendor id > 32K, attr argument is negative. so if (attr >= 0 && vp->attribute != attr) { will false attr >= 0 should be changed to attr == -1 for correct execution Michael
magmike@mail.ru wrote:
If you're running a 5 year-old version of the server, you really need to upgrade.
i use freeradiusd 2.1.12 $ freeradius -v freeradius: FreeRADIUS Version 2.1.12, for host i486-pc-linux-gnu, built on Dec 16 2012 at 22:03:33
<shrug> It works for me with the latest release.
Please try with 2.2.3. If the bug is still there, I'll look at it.
Alan DeKok.
It's like bug in functions which use VALUE_PAIR.attribute as signed int
i.e. paircopy2 from valuepair.c:359
------------------------------------------------------------- VALUE_PAIR *paircopy2(VALUE_PAIR *vp, int attr) { VALUE_PAIR *first, *n, **last;
first = NULL; last = &first;
while (vp) { if (attr >= 0 && vp->attribute != attr) { vp = vp->next; continue; } -------------------------------------------------------------
Here when vendor id > 32K, attr argument is negative. so if (attr >= 0 && vp->attribute != attr) { will false
attr >= 0 should be changed to attr == -1 for correct execution
Patch for 2.1.12: ---------------------------------------------------------------------------- --- src/lib/valuepair.c.orig 2014-01-17 17:54:53.105873692 +0600 +++ src/lib/valuepair.c 2014-01-17 17:57:06.313879873 +0600 @@ -358,24 +358,25 @@ */ VALUE_PAIR *paircopy2(VALUE_PAIR *vp, int attr) { - VALUE_PAIR *first, *n, **last; - - first = NULL; - last = &first; + VALUE_PAIR* result = NULL; + VALUE_PAIR* tail = NULL; + VALUE_PAIR* tmpcopy; while (vp) { - if (attr >= 0 && vp->attribute != attr) { - vp = vp->next; - continue; + if (attr == -1 || vp->attribute == attr) { + tmpcopy = paircopyvp(vp); + tmpcopy->next = NULL; + if (tail == NULL) { + result = tail = tmpcopy; + } else { + tail->next = tmpcopy; + tail = tmpcopy; + } } - - n = paircopyvp(vp); - if (!n) return first; - *last = n; - last = &n->next; vp = vp->next; } - return first; + + return result; } ---------------------------------------------------------------------------- It's look work good. Bug investigated and patch issued by my co-worker Dmitry Davletbaev <ddomgn@gmail.com> Michael
magmike@mail.ru wrote:
It's like bug in functions which use VALUE_PAIR.attribute as signed int
I found that list night, but didn't have time to push a fix. Please try the v2.x.x branch from git. I've pushed a fix.
Patch for 2.1.12:
Which may work, but needlessly re-writes code. The patch I pushed is one line. Alan DeKok.
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Laura Marzà Porcar -
magmike@mail.ru