Problem with rlm_perl

Anatoly S. Zimin anatolyz at team.co.ru
Tue Apr 7 13:45:15 CEST 2009


Привет!

На самом деле, весьма _неудобно_ искать проблемы просто по дебагу + конфиг. 
Уж лучше описать её хоть на "ломаном" англ.
Это так отступление... 

А вообще, у rlm_perl весьма много глюков. 
Например при работе с разными модулями, типа IO::Socket::XXXX.
Попробуйте все засунуть в один скрипт.
 

> Hello.
> 
> Config:
> perl auth_perl_pppoe {
>     module = /var/www/radius/radius_auth.pl
>     func_accounting = accounting
> }
> 
> perl acc_perl_pppoe {
>     module = /var/www/radius/radius_accounting.pl
>     func_authenticate = authenticate
> }
> 
> -----------------------------------------------------------------
> authenticate {
>         Auth-Type PPPOE_AUTH {
>             auth_perl_pppoe
>         }
> 
> }
> 
> #
> #  Accounting.  Log the accounting data.
> #
> accounting {
>         Acct-Type PPPOE_ACC {
>             acc_perl_pppoe
>         }
>         detail
>         unix
>         radutmp
> }
> 
> 
> this error in radiusd -X:
> 
> 
> rad_recv: Access-Request packet from host 93.95.41.141 port 53773, id=8,
> length=146
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         NAS-Port = 100
>         NAS-Port-Type = Ethernet
>         User-Name = "pppoe_test"
>         Calling-Station-Id = "00:13:77:60:60:CB"
>         Called-Station-Id = "internet"
>         NAS-Port-Id = "e2_v15"
>         CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
>         CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
>         NAS-Identifier = "ntk-hsgw"
>         NAS-IP-Address = 93.95.41.141
> +- entering group authorize {...}
> ++[preprocess] returns ok
> [suffix] No '@' in User-Name = "pppoe_test", looking up realm NULL
> [suffix] No such realm "NULL"
> ++[suffix] returns noop
> ++[mschap] returns noop
> ++[unix] returns notfound
> [files] users: Matched entry DEFAULT at line 1
> [files] users: Matched entry DEFAULT at line 7
> [files] users: Matched entry DEFAULT at line 19
> ++[files] returns ok
> ++[logintime] returns noop
> [pap] WARNING! No "known good" password found for the user.  Authentication
> may fail because of this.
> ++[pap] returns noop
> Found Auth-Type = PPPOE_AUTH
> +- entering group PPPOE_AUTH {...}
> GOT CLONE -1209066800 0x91011d8
> rlm_perl: Added pair NAS-Port-Type = Ethernet
> rlm_perl: Added pair CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
> rlm_perl: Added pair Huntgroup-Name = ntk_pppoe
> rlm_perl: Added pair Service-Type = Framed-User
> rlm_perl: Added pair Called-Station-Id = internet
> rlm_perl: Added pair Calling-Station-Id = 00:13:77:60:60:CB
> rlm_perl: Added pair Framed-Protocol = PPP
> rlm_perl: Added pair User-Name = pppoe_test
> rlm_perl: Added pair CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
> rlm_perl: Added pair NAS-Identifier = ntk-hsgw
> rlm_perl: Added pair NAS-IP-Address = 93.95.41.141
> rlm_perl: Added pair NAS-Port = 100
> rlm_perl: Added pair NAS-Port-Id = e2_v15
> rlm_perl: Added pair Framed-Protocol = PPP
> rlm_perl: Added pair Service-Type = Framed-User
> rlm_perl: Added pair Class = dialup
> rlm_perl: Added pair Mikrotik-Rate-Limit = 256k
> rlm_perl: Added pair Framed-Compression = Van-Jacobson-TCP-IP
> rlm_perl: Added pair Auth-Type = PPPOE_AUTH
> ++[auth_perl_pppoe] returns ok
> Login OK: [pppoe_test] (from client ntk-hsgw port 100 cli 00:13:77:60:60:CB)
> +- entering group post-auth {...}
> ++[exec] returns noop
> Sending Access-Accept of id 8 to 93.95.41.141 port 53773
>         Framed-Protocol = PPP
>         Service-Type = Framed-User
>         Class = 0x6469616c7570
>         Mikrotik-Rate-Limit = "256k"
>         Framed-Compression = Van-Jacobson-TCP-IP
> Finished request 0.
> Going to the next request
> Waking up in 4.9 seconds.
> rad_recv: Accounting-Request packet from host 93.95.41.141 port 57551, id=9,
> length=157
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         NAS-Port = 100
>         NAS-Port-Type = Ethernet
>         User-Name = "pppoe_test"
>         Calling-Station-Id = "00:13:77:60:60:CB"
>         Called-Station-Id = "internet"
>         NAS-Port-Id = "e2_v15"
>         Class = 0x6469616c7570
>         Acct-Session-Id = "8170005c"
>         Framed-IP-Address = 93.95.42.63
>         Acct-Authentic = RADIUS
>         Event-Timestamp = "Apr  7 2009 17:07:22 MSD"
>         Acct-Status-Type = Start
>         NAS-Identifier = "ntk-hsgw"
>         NAS-IP-Address = 93.95.41.141
>         Acct-Delay-Time = 0
> +- entering group preacct {...}
> ++[preprocess] returns ok
> [acct_unique] Hashing 'NAS-Port = 100,Client-IP-Address =
> 93.95.41.141,NAS-IP-Address = 93.95.41.141,Acct-Session-Id =
> "8170005c",User-Name = "pppoe_test"'
> [acct_unique] Acct-Unique-Session-ID = "de65ab6044a69020".
> ++[acct_unique] returns ok
> [files] acct_users: Matched entry DEFAULT at line 29
> ++[files] returns ok
>   Found Acct-Type PPPOE_ACC
> +- entering group PPPOE_ACC {...}
> rlm_perl: perl_embed:: module = /var/www/radius/radius_accounting.pl , func
> = accounting exit status= Undefined subroutine &main::accounting called.
> Use of uninitialized value.
> rlm_perl: Added pair NAS-Port-Type = Ethernet
> rlm_perl: Added pair Acct-Session-Id = 8170005c
> rlm_perl: Added pair Service-Type = Framed-User
> rlm_perl: Added pair Acct-Unique-Session-Id = de65ab6044a69020
> rlm_perl: Added pair Called-Station-Id = internet
> rlm_perl: Added pair Acct-Authentic = RADIUS
> rlm_perl: Added pair Acct-Status-Type = Start
> rlm_perl: Added pair NAS-IP-Address = 93.95.41.141
> rlm_perl: Added pair NAS-Port-Id = e2_v15
> rlm_perl: Added pair Huntgroup-Name = ntk_pppoe
> rlm_perl: Added pair Calling-Station-Id = 00:13:77:60:60:CB
> rlm_perl: Added pair Framed-Protocol = PPP
> rlm_perl: Added pair User-Name = pppoe_test
> rlm_perl: Added pair Event-Timestamp = Apr  7 2009 17:07:22 MSD
> rlm_perl: Added pair NAS-Identifier = ntk-hsgw
> rlm_perl: Added pair Framed-IP-Address = 93.95.42.63
> rlm_perl: Added pair Class = 0x6469616c7570
> rlm_perl: Added pair NAS-Port = 100
> rlm_perl: Added pair Acct-Delay-Time = 0
> rlm_perl: Added pair Acct-Type = PPPOE_ACC
> ++[acc_perl_pppoe] returns reject
> Finished request 1.
> Cleaning up request 1 ID 9 with timestamp +8
> Going to the next request
> Waking up in 4.9 seconds.
> rad_recv: Accounting-Request packet from host 93.95.41.141 port 57551, id=9,
> length=157
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         NAS-Port = 100
>         NAS-Port-Type = Ethernet
>         User-Name = "pppoe_test"
>         Calling-Station-Id = "00:13:77:60:60:CB"
>         Called-Station-Id = "internet"
>         NAS-Port-Id = "e2_v15"
>         Class = 0x6469616c7570
>         Acct-Session-Id = "8170005c"
>         Framed-IP-Address = 93.95.42.63
>         Acct-Authentic = RADIUS
>         Event-Timestamp = "Apr  7 2009 17:07:22 MSD"
>         Acct-Status-Type = Start
>         NAS-Identifier = "ntk-hsgw"
>         NAS-IP-Address = 93.95.41.141
>         Acct-Delay-Time = 4
> +- entering group preacct {...}
> ++[preprocess] returns ok
> [acct_unique] Hashing 'NAS-Port = 100,Client-IP-Address =
> 93.95.41.141,NAS-IP-Address = 93.95.41.141,Acct-Session-Id =
> "8170005c",User-Name = "pppoe_test"'
> [acct_unique] Acct-Unique-Session-ID = "de65ab6044a69020".
> ++[acct_unique] returns ok
> [files] acct_users: Matched entry DEFAULT at line 29
> ++[files] returns ok
>   Found Acct-Type PPPOE_ACC
> +- entering group PPPOE_ACC {...}
> rlm_perl: perl_embed:: module = /var/www/radius/radius_accounting.pl , func
> = accounting exit status= Undefined subroutine &main::accounting called.
> Segmentation fault
> 
> 
> But accounting exist in /var/www/radius/radius_accounting.pl. Why it?
> 
> 
> 
> Formula+ LTD,
> т.(8617) 61-02-01
> ф.(8617) 61-34-16
> м.(918) 634-7550
> voloshin at maks.net
> www.formulaplus.ru 
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list