[RADIATOR] Radiator Crashing when assigning IPv6
Heikki Vatiainen
hvn at open.com.au
Fri Dec 30 02:35:51 CST 2011
On 12/30/2011 12:37 AM, Adam O'Reilly wrote:
Hello Adam,
> I am having some problems assigning a delegated IPv6 prefix.
>
> The request is getting through the PostAuthHook File without any errors
> and is being accepted but radiator crashes before sending a request back
> to the BRAS.
>
> This is how I am assigning the prefix:
>
> $cfg::rp->add_attr('Delegated-IPv6-Prefix', "<PREFIX>/48");
I usually start PostAuthHook like this:
sub timelimit_hook {
my $p = ${$_[0]}; # Request packet
my $rp = ${$_[1]}; # Response packet
my $result = $_[2]; # Verdict: success or not
my $reason = $_[3]; # String that tells reason for a reject
To add to reply, I would do $rp->add_attr('Delegated-IPv6-Prefix',
"<PREFIX>/48");
Calling via $cfg::rp is possible if the code is structured to support
this, but it's impossible to say if it is correct without seeing the
hook code.
To see more messages, usually logged to stderr not Radiator log, try
running Radiator with '-trace 4 -log_stdout -foreground' options. I
usually debug with something like this:
% perl ~/radiator/Radiator-4.9/radiusd -I ~/radiator/Radiator-4.9
-dictionary ~/radiator/Radiator-4.9/dictionary -trace 4 -log_stdout
-foreground -config radius.cfg
> I am using Trace 5 and nothing about the crash is being logged.
Seeing stderr output should tell where it goes wrong. Please let us know
of your findings.
> I am using Radiator 4.9 and the latest patches.
4.9 should work. You do need Socket6.pm installed, but would receive a
log message instead of Radiator crashing if it is not there.
Thanks!
Heikki
> Could someone let me know how to get more debug or help with assigning
> the ipv6 prefix.
>
> Here is a log snipit:
>
> Fri Dec 30 08:54:20 2011: DEBUG: Finished reading configuration file
> '/usr/local/radiator/conf/radius.cfg'
> Fri Dec 30 08:54:20 2011: DEBUG: Reading dictionary file
> '/usr/local/radiator/conf/dictionary.adnap'
> Fri Dec 30 08:54:20 2011: DEBUG: Creating authentication port
> 0.0.0.0:1812 <http://0.0.0.0:1812>
> Fri Dec 30 08:54:20 2011: DEBUG: Creating accounting port
> 0.0.0.0:1813 <http://0.0.0.0:1813>
> Fri Dec 30 08:54:20 2011: NOTICE: Server started: Radiator 4.9 on
> testrad1
> Fri Dec 30 08:54:24 2011: DEBUG: Packet dump:
> *** Received from 127.0.0.1 port 37243 ....
>
> Packet length = 108
> 01 cc 00 6c 59 af 41 25 82 5e 7e bc f4 b2 d6 79
> b8 8b ab e4 01 07 6d 69 6b 65 6d 06 06 00 00 00
> 02 04 06 cb 3f 9a 01 20 0e 32 30 33 2e 36 33 2e
> 31 35 34 2e 31 05 06 00 00 04 d2 1e 0b 31 32 33
> 34 35 36 37 38 39 1f 0b 39 38 37 36 35 34 33 32
> 31 3d 06 00 00 00 00 02 12 e1 24 db 96 42 65 f4
> 2d 5f ed af 40 fe 30 88 04 7e 03 34
> Code: Access-Request
> Identifier: 204
> Authentic: Y<175>A%<130>^~<188><244><178><214>y<184><139><171><228>
> Attributes:
> User-Name = "mikem"
> Service-Type = Framed-User
> NAS-IP-Address =
> NAS-Identifier = ""
> NAS-Port = 1234
> Called-Station-Id = "123456789"
> Calling-Station-Id = "987654321"
> NAS-Port-Type = Async
> User-Password =
> <225>$<219><150>Be<244>-_<237><175>@<254>0<136><4>
> Operator-Name = "4"
>
> Fri Dec 30 08:54:24 2011: DEBUG: Handling request with Handler
> 'Client-Identifier = , Request-Type = Access-Request', Identifier ''
> Fri Dec 30 08:54:24 2011: DEBUG: Rewrote user name to mikem
> Fri Dec 30 08:54:24 2011: DEBUG: Rewrote user name to mikem
> Fri Dec 30 08:54:24 2011: DEBUG: Rewrote user name to mikem
> Fri Dec 30 08:54:24 2011: DEBUG: Deleting session for mikem,, 1234
> Fri Dec 30 08:54:24 2011: DEBUG: Handling with AuthINTERNAL: AuthAccept
> Fri Dec 30 08:54:24 2011: DEBUG: AuthBy INTERNAL result: ACCEPT,
> Fixed by DefaultResult
> Fri Dec 30 08:54:24 2011: NOTICE: Started Post Authentication Hook
> for mikem
> Fri Dec 30 08:54:24 2011: NOTICE: Auto accepting loging for mikem
> Fri Dec 30 08:54:24 2011: NOTICE: DEBUG 1
> Fri Dec 30 08:54:24 2011: NOTICE: DEBUG 2
> Fri Dec 30 08:54:24 2011: NOTICE: DEBUG 3
> Fri Dec 30 08:54:24 2011: DEBUG: Access accepted for mikem
>
>
> Thanks Adam O'Reilly
>
>
>
>
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator
--
Heikki Vatiainen <hvn at open.com.au>
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.
More information about the radiator
mailing list