Tobi, Niko, all,
here's a couple of simple patches I've made a while back that are useful
to our installations of SmokePing. Maybe, they could be included in
latter versions
The first one is the addition of "Nas_Port_Type" attribute
(http://www.freeradius.org/rfc/rfc2865.html#NAS-Port-Type) in Radius.pm
The second one is the ability to use a custom port to telnet to in the
TelnetIOSPing.pm .
cheers,
dez
--- Radius.pm 2005-09-26 23:14:39.000000000 +0300
+++ Radius-f.pm 2008-05-26 10:47:00.000000000 +0300
@@ -163,6 +163,8 @@
);
$r->add_attributes( { Name => 4, Type => 'ipaddr', Value => $vars->{nas_ip_address} })
if exists $vars->{nas_ip_address};
+ $r->add_attributes( { Name => 61, Type => 'integer', Value => $vars->{nas_port_type} })
+ if exists $vars->{nas_port_type};
my $c;
my $start = gettimeofday();
$r->send_packet(&ACCESS_REQUEST) and $c = $r->recv_packet;
@@ -227,6 +229,10 @@
_doc => 'The NAS-IP-Address RADIUS attribute for the authentication requests. Not needed everywhere.',
_example => '10.1.2.3',
},
+ nas_port_type => {
+ _doc => 'The NAS-Port-Type RADIUS attribute for the authentication requests. Not needed everywhere.',
+ _example => '0',
+ },
mininterval => {
_default => $DEFAULTINTERVAL,
_doc => "The minimum interval between each authentication request sent, in (possibly fractional) seconds.",
--- TelnetIOSPing.pm 2005-09-26 23:14:39.000000000 +0300
+++ TelnetIOSPing-f.pm 2008-05-26 11:21:08.000000000 +0300
@@ -131,7 +131,9 @@
my $source = $target->{vars}{source};
my $dest = $target->{vars}{host};
my $psource = $target->{vars}{psource} || "";
- my $port = 23;
+
+ ## port is now a *mandatory* variable instead of "23",
+ my $port = $target->{vars}{port};
my @output = ();
my $login = $target->{vars}{iosuser};
my $pssword = $target->{vars}{iospass};
@@ -263,6 +265,12 @@
DOC
_example => "192.168.2.129",
},
+ port => {
+ _doc => <<DOC,
+port number to telnet to.
+DOC
+ _example => '23',
+ },
iosuser => {
_doc => <<DOC,
The iosuser option allows you to specify a username that has ping
_______________________________________________
smokeping-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users