[RADIATOR] Realm processing via hook

Robert Blayzor rblayzor.bulk at inoc.net
Fri Nov 17 16:29:10 UTC 2017


This is what I ended up with in my pre-Handler hook:

    unless (my $r = $p->get_attr('Realm')) {
        if (my $ci = $p->get_attr('Connect-Info')) {
            if ($ci =~ /([^\.]+\.[^\.]+)$/) {
                $p->change_attr('Connect-Info', '');

Assuming I get no ‘Realm’ (user did not login with user at realm), then I can pull the domain part out and try to realm with that. The “connect-info” is an arbitrary text that we can supply from the NAS side.

XMPP: rblayzor.AT.inoc.net
PGP:  https://inoc.net/~rblayzor/

> On Nov 15, 2017, at 10:39 AM, Heikki Vatiainen <hvn at open.com.au> wrote:
> Since get_attr('Realm') does not work, to get the realm part from the username you need to do something like below (using shorthand syntax):

More information about the radiator mailing list