diff options
author | phk <phk@FreeBSD.org> | 1997-03-07 00:38:07 +0800 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-03-07 00:38:07 +0800 |
commit | 24d2107c9ad09580b8784f3cfb2de654fe674cbf (patch) | |
tree | 0f362b796143331e0918a5247512f8463061cf66 | |
parent | a484b71a69446a1978acf95df824258798f6f91d (diff) | |
download | freebsd-ports-gnome-24d2107c9ad09580b8784f3cfb2de654fe674cbf.tar.gz freebsd-ports-gnome-24d2107c9ad09580b8784f3cfb2de654fe674cbf.tar.zst freebsd-ports-gnome-24d2107c9ad09580b8784f3cfb2de654fe674cbf.zip |
Improve the IP-discover application.
Fix INADDR_LOOPBACK starvation.
Don't react to pings that come back from another address than what we
pinged.
-rw-r--r-- | net-mgmt/scotty3/files/patch-ab | 82 | ||||
-rw-r--r-- | net-mgmt/scotty3/files/patch-ac | 23 | ||||
-rw-r--r-- | net-mgmt/scotty3/files/patch-ae | 19 | ||||
-rw-r--r-- | net/scotty/files/patch-ab | 82 | ||||
-rw-r--r-- | net/scotty/files/patch-ac | 23 | ||||
-rw-r--r-- | net/scotty/files/patch-ae | 19 | ||||
-rw-r--r-- | net/scotty3/files/patch-ab | 82 | ||||
-rw-r--r-- | net/scotty3/files/patch-ac | 23 | ||||
-rw-r--r-- | net/scotty3/files/patch-ae | 19 |
9 files changed, 126 insertions, 246 deletions
diff --git a/net-mgmt/scotty3/files/patch-ab b/net-mgmt/scotty3/files/patch-ab index 06393a6dc6db..fea4b9f9de78 100644 --- a/net-mgmt/scotty3/files/patch-ab +++ b/net-mgmt/scotty3/files/patch-ab @@ -1,69 +1,15 @@ ---- ../tkined/apps/ip_discover.tcl Thu Sep 12 22:01:03 1996 -+++ /usr/local/lib/tkined1.4.5/apps/ip_discover.tcl Tue Mar 4 23:05:50 1997 -@@ -30,6 +30,7 @@ - set columns 16 - set report true - set debug false -+set communities {public private} - - - ## -@@ -343,20 +344,22 @@ - } - - proc discover_snmp {} { -- global nodes address snmp -+ global nodes address snmp communities - global icmp_retries icmp_timeout - set start [clock seconds] - mib load rfc1213.mib -- foreach id [array names nodes] { -- set ip $address($id) -- if {[catch {snmp session -address $ip \ -- -retries $icmp_retries -timeout $icmp_timeout} s]} continue -- if {[catch { -- $s get sysObjectID.0 [list discover_snmp_callback $id "%S" "%E"] -- } msg]} { -- writeln "Oops: $ip get sysObjectID.0: $msg" -+ foreach com $communities { -+ foreach id [array names nodes] { -+ set ip $address($id) -+ if {[catch {snmp session -address $ip -community $com \ -+ -retries $icmp_retries -timeout $icmp_timeout} s]} continue -+ if {[catch { -+ $s get sysObjectID.0 [list discover_snmp_callback $id "%S" "%E"] -+ } msg]} { -+ writeln "Oops: $ip get sysObjectID.0: $msg" -+ } -+ update +--- ../tkined/apps/snmp_monitor.tcl Mon Sep 2 18:30:19 1996 ++++ ..//tkined/apps/snmp_monitor.tcl Mon Mar 3 14:43:52 1997 +@@ -482,8 +482,11 @@ + + set args $ip + set i 0 ++ set snmpconfig [ined attribute $id "SNMP:Config"] + foreach if $iflist { +- lappend args [CreateChart $id [expr 30+$i] [expr 30+$i]] ++ set nid [CreateChart $id [expr 30+$i] [expr 30+$i]] ++ lappend args $nid ++ ined -noupdate attribute $nid "SNMP:Config" $snmpconfig + lappend args $if + incr i } -- update - } - snmp wait - set count [llength [array names snmp]] -@@ -1276,6 +1279,7 @@ - global email_trace - global report - global debug -+ global communities - - set result [ined request "IP-Discover Parameter" \ - [list [list "# of ICMP retries:" $icmp_retries scale 1 10] \ -@@ -1287,7 +1291,8 @@ - [list "Nodes per row:" $columns scale 10 40] \ - [list "Email Discover Routes:" $email_trace radio true false] \ - [list "Write Report:" $report radio true false] \ -- [list "Debug Mode:" $debug radio true false] ] \ -+ [list "Debug Mode:" $debug radio true false] \ -+ [list "SNMP Communities:" $communities entry 10] ] \ - [list "set values" cancel] ] - - if {[lindex $result 0] == "cancel"} return -@@ -1302,6 +1307,7 @@ - set email_trace [lindex $result 8] - set report [lindex $result 9] - set debug [lindex $result 10] -+ set communities [lindex $result 11] - - icmp -retries $icmp_retries - icmp -timeout $icmp_timeout diff --git a/net-mgmt/scotty3/files/patch-ac b/net-mgmt/scotty3/files/patch-ac index fea4b9f9de78..40ac4a2358ad 100644 --- a/net-mgmt/scotty3/files/patch-ac +++ b/net-mgmt/scotty3/files/patch-ac @@ -1,15 +1,10 @@ ---- ../tkined/apps/snmp_monitor.tcl Mon Sep 2 18:30:19 1996 -+++ ..//tkined/apps/snmp_monitor.tcl Mon Mar 3 14:43:52 1997 -@@ -482,8 +482,11 @@ +--- ../tnm/generic/tnmPort.h Tue Aug 6 13:49:19 1996 ++++ ../tnm/generic/tnmPort.h Thu Mar 6 17:10:29 1997 +@@ -20,4 +20,7 @@ + # include "../../unix/tnmUnixPort.h" + #endif - set args $ip - set i 0 -+ set snmpconfig [ined attribute $id "SNMP:Config"] - foreach if $iflist { -- lappend args [CreateChart $id [expr 30+$i] [expr 30+$i]] -+ set nid [CreateChart $id [expr 30+$i] [expr 30+$i]] -+ lappend args $nid -+ ined -noupdate attribute $nid "SNMP:Config" $snmpconfig - lappend args $if - incr i - } ++#ifndef INADDR_LOOPBACK ++#define INADDR_LOOPBACK 0x7f000001 ++#endif + #endif /* _TNMPORT */ diff --git a/net-mgmt/scotty3/files/patch-ae b/net-mgmt/scotty3/files/patch-ae new file mode 100644 index 000000000000..3acac9b44a79 --- /dev/null +++ b/net-mgmt/scotty3/files/patch-ae @@ -0,0 +1,19 @@ +--- ../tnm/ntping/ntping.c Thu Sep 19 10:59:13 1996 ++++ ../tnm/ntping/ntping.c Thu Mar 6 17:32:03 1997 +@@ -749,7 +749,15 @@ + return; + } + +- dprintf (stderr, "* .. got host %s .. ", job->hname); ++ dprintf (stderr, "* .. got host %s .. %x %x ", job->hname, ++ sfrom.sin_addr.s_addr, job->sa.sin_addr.s_addr ); ++ ++ if ( type == ping && sfrom.sin_addr.s_addr != job->sa.sin_addr.s_addr) ++ { ++ dprintf (stderr, "* non-matching IP# was: %x should be:%x.\n", ++ sfrom.sin_addr.s_addr, job->sa.sin_addr.s_addr ); ++ return; ++ } + + switch (type) + { diff --git a/net/scotty/files/patch-ab b/net/scotty/files/patch-ab index 06393a6dc6db..fea4b9f9de78 100644 --- a/net/scotty/files/patch-ab +++ b/net/scotty/files/patch-ab @@ -1,69 +1,15 @@ ---- ../tkined/apps/ip_discover.tcl Thu Sep 12 22:01:03 1996 -+++ /usr/local/lib/tkined1.4.5/apps/ip_discover.tcl Tue Mar 4 23:05:50 1997 -@@ -30,6 +30,7 @@ - set columns 16 - set report true - set debug false -+set communities {public private} - - - ## -@@ -343,20 +344,22 @@ - } - - proc discover_snmp {} { -- global nodes address snmp -+ global nodes address snmp communities - global icmp_retries icmp_timeout - set start [clock seconds] - mib load rfc1213.mib -- foreach id [array names nodes] { -- set ip $address($id) -- if {[catch {snmp session -address $ip \ -- -retries $icmp_retries -timeout $icmp_timeout} s]} continue -- if {[catch { -- $s get sysObjectID.0 [list discover_snmp_callback $id "%S" "%E"] -- } msg]} { -- writeln "Oops: $ip get sysObjectID.0: $msg" -+ foreach com $communities { -+ foreach id [array names nodes] { -+ set ip $address($id) -+ if {[catch {snmp session -address $ip -community $com \ -+ -retries $icmp_retries -timeout $icmp_timeout} s]} continue -+ if {[catch { -+ $s get sysObjectID.0 [list discover_snmp_callback $id "%S" "%E"] -+ } msg]} { -+ writeln "Oops: $ip get sysObjectID.0: $msg" -+ } -+ update +--- ../tkined/apps/snmp_monitor.tcl Mon Sep 2 18:30:19 1996 ++++ ..//tkined/apps/snmp_monitor.tcl Mon Mar 3 14:43:52 1997 +@@ -482,8 +482,11 @@ + + set args $ip + set i 0 ++ set snmpconfig [ined attribute $id "SNMP:Config"] + foreach if $iflist { +- lappend args [CreateChart $id [expr 30+$i] [expr 30+$i]] ++ set nid [CreateChart $id [expr 30+$i] [expr 30+$i]] ++ lappend args $nid ++ ined -noupdate attribute $nid "SNMP:Config" $snmpconfig + lappend args $if + incr i } -- update - } - snmp wait - set count [llength [array names snmp]] -@@ -1276,6 +1279,7 @@ - global email_trace - global report - global debug -+ global communities - - set result [ined request "IP-Discover Parameter" \ - [list [list "# of ICMP retries:" $icmp_retries scale 1 10] \ -@@ -1287,7 +1291,8 @@ - [list "Nodes per row:" $columns scale 10 40] \ - [list "Email Discover Routes:" $email_trace radio true false] \ - [list "Write Report:" $report radio true false] \ -- [list "Debug Mode:" $debug radio true false] ] \ -+ [list "Debug Mode:" $debug radio true false] \ -+ [list "SNMP Communities:" $communities entry 10] ] \ - [list "set values" cancel] ] - - if {[lindex $result 0] == "cancel"} return -@@ -1302,6 +1307,7 @@ - set email_trace [lindex $result 8] - set report [lindex $result 9] - set debug [lindex $result 10] -+ set communities [lindex $result 11] - - icmp -retries $icmp_retries - icmp -timeout $icmp_timeout diff --git a/net/scotty/files/patch-ac b/net/scotty/files/patch-ac index fea4b9f9de78..40ac4a2358ad 100644 --- a/net/scotty/files/patch-ac +++ b/net/scotty/files/patch-ac @@ -1,15 +1,10 @@ ---- ../tkined/apps/snmp_monitor.tcl Mon Sep 2 18:30:19 1996 -+++ ..//tkined/apps/snmp_monitor.tcl Mon Mar 3 14:43:52 1997 -@@ -482,8 +482,11 @@ +--- ../tnm/generic/tnmPort.h Tue Aug 6 13:49:19 1996 ++++ ../tnm/generic/tnmPort.h Thu Mar 6 17:10:29 1997 +@@ -20,4 +20,7 @@ + # include "../../unix/tnmUnixPort.h" + #endif - set args $ip - set i 0 -+ set snmpconfig [ined attribute $id "SNMP:Config"] - foreach if $iflist { -- lappend args [CreateChart $id [expr 30+$i] [expr 30+$i]] -+ set nid [CreateChart $id [expr 30+$i] [expr 30+$i]] -+ lappend args $nid -+ ined -noupdate attribute $nid "SNMP:Config" $snmpconfig - lappend args $if - incr i - } ++#ifndef INADDR_LOOPBACK ++#define INADDR_LOOPBACK 0x7f000001 ++#endif + #endif /* _TNMPORT */ diff --git a/net/scotty/files/patch-ae b/net/scotty/files/patch-ae new file mode 100644 index 000000000000..3acac9b44a79 --- /dev/null +++ b/net/scotty/files/patch-ae @@ -0,0 +1,19 @@ +--- ../tnm/ntping/ntping.c Thu Sep 19 10:59:13 1996 ++++ ../tnm/ntping/ntping.c Thu Mar 6 17:32:03 1997 +@@ -749,7 +749,15 @@ + return; + } + +- dprintf (stderr, "* .. got host %s .. ", job->hname); ++ dprintf (stderr, "* .. got host %s .. %x %x ", job->hname, ++ sfrom.sin_addr.s_addr, job->sa.sin_addr.s_addr ); ++ ++ if ( type == ping && sfrom.sin_addr.s_addr != job->sa.sin_addr.s_addr) ++ { ++ dprintf (stderr, "* non-matching IP# was: %x should be:%x.\n", ++ sfrom.sin_addr.s_addr, job->sa.sin_addr.s_addr ); ++ return; ++ } + + switch (type) + { diff --git a/net/scotty3/files/patch-ab b/net/scotty3/files/patch-ab index 06393a6dc6db..fea4b9f9de78 100644 --- a/net/scotty3/files/patch-ab +++ b/net/scotty3/files/patch-ab @@ -1,69 +1,15 @@ ---- ../tkined/apps/ip_discover.tcl Thu Sep 12 22:01:03 1996 -+++ /usr/local/lib/tkined1.4.5/apps/ip_discover.tcl Tue Mar 4 23:05:50 1997 -@@ -30,6 +30,7 @@ - set columns 16 - set report true - set debug false -+set communities {public private} - - - ## -@@ -343,20 +344,22 @@ - } - - proc discover_snmp {} { -- global nodes address snmp -+ global nodes address snmp communities - global icmp_retries icmp_timeout - set start [clock seconds] - mib load rfc1213.mib -- foreach id [array names nodes] { -- set ip $address($id) -- if {[catch {snmp session -address $ip \ -- -retries $icmp_retries -timeout $icmp_timeout} s]} continue -- if {[catch { -- $s get sysObjectID.0 [list discover_snmp_callback $id "%S" "%E"] -- } msg]} { -- writeln "Oops: $ip get sysObjectID.0: $msg" -+ foreach com $communities { -+ foreach id [array names nodes] { -+ set ip $address($id) -+ if {[catch {snmp session -address $ip -community $com \ -+ -retries $icmp_retries -timeout $icmp_timeout} s]} continue -+ if {[catch { -+ $s get sysObjectID.0 [list discover_snmp_callback $id "%S" "%E"] -+ } msg]} { -+ writeln "Oops: $ip get sysObjectID.0: $msg" -+ } -+ update +--- ../tkined/apps/snmp_monitor.tcl Mon Sep 2 18:30:19 1996 ++++ ..//tkined/apps/snmp_monitor.tcl Mon Mar 3 14:43:52 1997 +@@ -482,8 +482,11 @@ + + set args $ip + set i 0 ++ set snmpconfig [ined attribute $id "SNMP:Config"] + foreach if $iflist { +- lappend args [CreateChart $id [expr 30+$i] [expr 30+$i]] ++ set nid [CreateChart $id [expr 30+$i] [expr 30+$i]] ++ lappend args $nid ++ ined -noupdate attribute $nid "SNMP:Config" $snmpconfig + lappend args $if + incr i } -- update - } - snmp wait - set count [llength [array names snmp]] -@@ -1276,6 +1279,7 @@ - global email_trace - global report - global debug -+ global communities - - set result [ined request "IP-Discover Parameter" \ - [list [list "# of ICMP retries:" $icmp_retries scale 1 10] \ -@@ -1287,7 +1291,8 @@ - [list "Nodes per row:" $columns scale 10 40] \ - [list "Email Discover Routes:" $email_trace radio true false] \ - [list "Write Report:" $report radio true false] \ -- [list "Debug Mode:" $debug radio true false] ] \ -+ [list "Debug Mode:" $debug radio true false] \ -+ [list "SNMP Communities:" $communities entry 10] ] \ - [list "set values" cancel] ] - - if {[lindex $result 0] == "cancel"} return -@@ -1302,6 +1307,7 @@ - set email_trace [lindex $result 8] - set report [lindex $result 9] - set debug [lindex $result 10] -+ set communities [lindex $result 11] - - icmp -retries $icmp_retries - icmp -timeout $icmp_timeout diff --git a/net/scotty3/files/patch-ac b/net/scotty3/files/patch-ac index fea4b9f9de78..40ac4a2358ad 100644 --- a/net/scotty3/files/patch-ac +++ b/net/scotty3/files/patch-ac @@ -1,15 +1,10 @@ ---- ../tkined/apps/snmp_monitor.tcl Mon Sep 2 18:30:19 1996 -+++ ..//tkined/apps/snmp_monitor.tcl Mon Mar 3 14:43:52 1997 -@@ -482,8 +482,11 @@ +--- ../tnm/generic/tnmPort.h Tue Aug 6 13:49:19 1996 ++++ ../tnm/generic/tnmPort.h Thu Mar 6 17:10:29 1997 +@@ -20,4 +20,7 @@ + # include "../../unix/tnmUnixPort.h" + #endif - set args $ip - set i 0 -+ set snmpconfig [ined attribute $id "SNMP:Config"] - foreach if $iflist { -- lappend args [CreateChart $id [expr 30+$i] [expr 30+$i]] -+ set nid [CreateChart $id [expr 30+$i] [expr 30+$i]] -+ lappend args $nid -+ ined -noupdate attribute $nid "SNMP:Config" $snmpconfig - lappend args $if - incr i - } ++#ifndef INADDR_LOOPBACK ++#define INADDR_LOOPBACK 0x7f000001 ++#endif + #endif /* _TNMPORT */ diff --git a/net/scotty3/files/patch-ae b/net/scotty3/files/patch-ae new file mode 100644 index 000000000000..3acac9b44a79 --- /dev/null +++ b/net/scotty3/files/patch-ae @@ -0,0 +1,19 @@ +--- ../tnm/ntping/ntping.c Thu Sep 19 10:59:13 1996 ++++ ../tnm/ntping/ntping.c Thu Mar 6 17:32:03 1997 +@@ -749,7 +749,15 @@ + return; + } + +- dprintf (stderr, "* .. got host %s .. ", job->hname); ++ dprintf (stderr, "* .. got host %s .. %x %x ", job->hname, ++ sfrom.sin_addr.s_addr, job->sa.sin_addr.s_addr ); ++ ++ if ( type == ping && sfrom.sin_addr.s_addr != job->sa.sin_addr.s_addr) ++ { ++ dprintf (stderr, "* non-matching IP# was: %x should be:%x.\n", ++ sfrom.sin_addr.s_addr, job->sa.sin_addr.s_addr ); ++ return; ++ } + + switch (type) + { |