AW: (RADIATOR) more intelligent rewriteusername
Martin Wallner
Martin.Wallner at eunet.co.at
Thu Sep 1 19:14:56 CDT 2005
Jon,
I don't know how loaded your RADIUS-servers are, but rewrite sub's are (IMHO) taking too much time in high load environments (call me bickering, but I stand to it :-).
It's much faster to strip the realm after entering the Handler, regardless if it's there or not (you are sure that you have handle the wholesale-part, because it's already in the appropriate handler/realm), do the authentication of the username without the realm part, and then, before sending it into the Accountingpart of the handler, rewrite it again to username at wholesale.domain before you write it in the file.... (In an SQL-Accounting/Authenticating environment you can even let the sql-server add the wholesale.domain part with the authentication sql select or accounting-function sql insert....)
Martin
________________________________
Von: owner-radiator at open.com.au im Auftrag von Jon Lewis
Gesendet: Do 01.09.2005 18:27
An: radiator at open.com.au
Betreff: (RADIATOR) more intelligent rewriteusername
I've got a situation where we have wholesale dialup customers for which
we've setup their own dialup numbers. This is so their customers can
dialup and login as just username...but a few of them are logging in as
username at wholesaledomain. This is causing accounting issues as we've been
doing a RewriteUsername s/^(.*)/$1\@wholesaledomain/ in a handler for
their dialup numbers. So we end up with some accounting for
username at wholesaledomain@wholesaledomain.
Is the following a good way to solve this problem in place of
RewriteUsername?
RewriteFunction sub { my($user) = shift; my $dom = '@wholesaledomain';
if ($user !~ m/$dom/i) { $user .= $dom; } $user;}
----------------------------------------------------------------------
Jon Lewis | I route
Senior Network Engineer | therefore you are
Atlantic Net |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20050902/649be515/attachment.html>
More information about the radiator
mailing list