(RADIATOR) AuthRADIUS <Hosts ..> patch

Mike McCauley mikem at open.com.au
Mon Feb 5 16:25:49 CST 2007


Hello Bjoern,

Thanks for your patch. 
It has been applied and is now in the latest patch set.

Cheers.

On Monday 05 February 2007 19:43, Bjoern A. Zeeb wrote:
> Hi,
>
> while doing some consulting work on Radiator we found that one cannot
> configure LocalAddress inside a <Host ..> clause of an <AuthBy RADIUS>.
>
> Attached patch allows you configure a LocalAddress per Host an fall back
> to the one from the AuthBy clause which falls back to the global
> setting. In addition it allows OutPort to be configurable per Host
> in the same way.
>
> Seemed to work with both <Host ..> clauses and Host entries directly in
> the AuthBy clause. If it looks ok to you too feel free to add it to the
> next patchset and update the documentation.
>
>
> Regards
> Bjoern
>
>
> --- AuthRADIUS.pm.orig	Thu Feb  1 11:33:57 2007
> +++ AuthRADIUS.pm	Thu Feb  1 11:58:38 2007
> @@ -288 +288 @@ sub getSock
> -    my ($self, $dest_addr) = @_;
> +    my ($self, $dest_addr, $host) = @_;
> @@ -291 +291 @@ sub getSock
> -    my @bind_address = split(/\s*,\s*/,
> &Radius::Util::format_special($self->{LocalAddress})); +    my
> @bind_address = split(/\s*,\s*/,
> &Radius::Util::format_special($host->{LocalAddress})); @@ -305 +305 @@ sub
> getSock
> -	$thisaddr =
> &Socket6::pack_sockaddr_in6(&Radius::Util::get_port($self->{OutPort}),
> +	$thisaddr =
> &Socket6::pack_sockaddr_in6(&Radius::Util::get_port($host->{OutPort}), @@
> -321 +321 @@ sub getSock
> -	$thisaddr = scalar
> &Socket::sockaddr_in(&Radius::Util::get_port($self->{OutPort}),
> Socket::inet_aton($localaddr)); +	$thisaddr = scalar
> &Socket::sockaddr_in(&Radius::Util::get_port($host->{OutPort}),
> Socket::inet_aton($localaddr)); @@ -867 +867 @@ sub sendHost
> -    $fp->{SendSocket} = $self->getSock($addr);
> +    $fp->{SendSocket} = $self->getSock($addr, $host);
> @@ -904,0 +905,2 @@ sub addHost
> +	 'LocalAddress'               => $self->{LocalAddress},
> +	 'OutPort'                    => $self->{OutPort},
> @@ -945,0 +948,2 @@ package Radius::Host;
> +     'LocalAddress'               => 'string',
> +     'OutPort'                    => 'string',
> @@ -998,0 +1003 @@ sub initialize
> +    $self->{OutPort} = 0;

-- 
Mike McCauley                               mikem at open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
9 Bulbul Place Currumbin Waters QLD 4223 Australia   http://www.open.com.au
Phone +61 7 5598-7474                       Fax   +61 7 5598-7070

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 etc on Unix, Windows, MacOS, NetWare etc.

--
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.


More information about the radiator mailing list