Hi Charles -

On Saturday 16 December 2000 17:52, Charles Sprickman wrote:
> On Sat, 16 Dec 2000, Hugh Irvine wrote:
> > Hi Charles -
> >
> > Radiator uses the internal Perl module (Net::ping from memory) and it
> > must be run as root to be able to do ICMP pings. The module can also do
> > TCP or UDP pings without being root, but I couldn't see how that would be
> > very useful.
>
> I was looking at the code in Nas.pm:
>
> sub isOnlinePing
> {
>     my ($name, $nas_id, $nas_port, $session_id, $client,
> $framed_ip_address) = @
> _;
>
>     # No framed-IP address?
>     return 0 unless $framed_ip_address;
>
>     # Build a ping packet
>     my $p = Net::Ping->new("icmp");
>
>     # and send it with a one second timeout
>     my $ret = $p->ping($framed_ip_address, $Radius::Nas::PingTimeout);
>     $p->close();
>
>     return $ret; # there = 1, not there = 0
> }
>
> And it looks like I could pretty easily change this to use an external
> ping command.  I noticed the standard unix ping has a 10-second timeout
> (freebsd), but I can likely work around that.  I don't have my camel book
> handy, but the success of the ping command is reported in the exit value.
>
> Before I go nuts with this though, can anyone comment on this method of
> double-checking the session db?  It looks to be my only option with IPass
> clients...
>

I originally set it up with an external program, but it was very messy, and 
the timeout didn't work well at all. The suggestion to use Net::Ping came 
from someone on the list (you can probably find it on the archive site), and 
it turned out to be a much better option. There was also quite a bit of 
discussion on the list, so I would suggest you check there first.

regards

Hugh


-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.


===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to