Subject: | Automated "clever" default for NAS-IP-Address attribute |
Thanks for maintaining RadiusPerl! I today made Bugzilla offer to use it
as an optional alternative authentication method in addition to LDAP and
a proprietary way (see https://bugzilla.mozilla.org/show_bug.cgi?id=380187).
I'm coming here with an enhancement request, which is having a more
straightforward default for the NAS-IP-Address attribute instead of
127.0.0.1. I'd find it helpful to have an actual IP address of the
sending network adapter there. So what do you think about replacing the line
{ Name => 4, Value => $nas || '127.0.0.1', Type => 'ipaddr' }
by
{ Name => 4, Value => $nas
|| $self->{'sock'}->sockhost(), Type => 'ipaddr' }
and by this allowing me to omit specifying this parameter in most
single-network-adapter scenarios?
Alternatively, if there were a stable way to access the socket (instead
of going the undocumented way of accessing $radiusObject->{'sock'}), I'd
be able to do this externally myself. Do you think it might be a good
thing to add a method for this to the Authen::Radius class?