Pool-Name from Called-Station-Id
Hugh Messenger
hugh at alaweb.com
Fri May 18 19:25:11 CEST 2007
Alan DeKok <aland at deployingradius.com> said:
> Try putting it in the "hints" section. I think the "users" file
> doesn't do the proper translations, unfortunately.
>
> DEFAULT Calling-Station-Id =~ ...
> Pool-Name = ...
>
> That might work.
Unfortunately not.
It does produce a slightly different failure mode though. Instead of
issuing queries with a blank pool_name, sqlippool barfs about missing
pool_name. It looks like the default in the hints is triggering, but the
Pool-Name attribute isn't making it through to sqlippool.
Here's my hints entry:
DEFAULT Called-Station-Id =~ "^([A-z0-9]+_pppoe_[0-9]+)$"
Pool-Name = `%{1}`
... and here's the relevant parts of a log, after running a test from
NTRadPing:
rad_recv: Access-Request packet from host x.x.x.x:1926, id=0, length=93
User-Name = "radiustest"
User-Password = "xxxxxxxx"
NAS-Port = 123456
NAS-IP-Address = x.x.x.x
Calling-Station-Id = "00:60:B3:45:6A:98"
Called-Station-Id = "wibbly_pppoe_666"
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 8
hints: Matched DEFAULT at 36
radius_xlat: 'wibbly_pppoe_666'
[... snip hack bobbit ...]
pam_pass: using pamauth string <radiusd> for pam.conf lookup
pam_pass: authentication succeeded for <radiustest>
modcall[authenticate]: module "pam" returns ok for request 0
modcall: leaving group authenticate (returns ok) for request 0
Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 0
rlm_sqlippool: missing pool_name
modcall[post-auth]: module "sqlippool" returns noop for request 0
This isn't desperately urgent, as I've now entered our 50 or so pools into
the users file as individual DEFAULT lines, but it sure would be nice to be
able to replace them with a single entry, and not have to worry about
maintaining the users file as we add and change wireless sectors.
> Alan DeKok.
-- hugh
More information about the Freeradius-Users
mailing list