summaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2004-02-13 09:31:58 +0000
committerlinimon <linimon@FreeBSD.org>2004-02-13 09:31:58 +0000
commit2f64affbc28afc46d02658f5d6840cb1b7c2048e (patch)
tree176a366cc390934c970e1bbec26593fc5a8bf106 /net-mgmt
parent3a0517cf417ea77fc9453cf502645f699c7979da (diff)
downloadFreeBSD-ports-2f64affbc28afc46d02658f5d6840cb1b7c2048e.zip
FreeBSD-ports-2f64affbc28afc46d02658f5d6840cb1b7c2048e.tar.gz
If you attempt to send an ICMP echo to a host on the same ethernet
subnet, and that host is down/turned off, the Tnm::icmp echo command will fail rather than return an unreachable indication on some occasions. This is because the nmicmpd program will occasionally get an EHOSTDOWN error when doing a sendto() when the ARP entry resolution times out. This is a problem since this API can support a list of hosts to send traffic to, and a single error as described will abort the entire operation. (The reviewer claims that he could not duplicate the problem, but that the patch seems like a good idea anyway.) PR: ports/24940 Submitted by: Louis Mamakos <louie@transsys.com> Reviewed by: Stefan Eßer <se@FreeBSD.org>
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/scotty3/files/patch-unix:nmicmpd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net-mgmt/scotty3/files/patch-unix:nmicmpd.c b/net-mgmt/scotty3/files/patch-unix:nmicmpd.c
new file mode 100644
index 0000000..6432fa8
--- /dev/null
+++ b/net-mgmt/scotty3/files/patch-unix:nmicmpd.c
@@ -0,0 +1,17 @@
+--- nmicmpd.c.orig Tue Feb 6 15:34:03 2001
++++ nmicmpd.c Tue Feb 6 15:44:53 2001
+@@ -924,6 +924,14 @@
+
+ if (rc != size) {
+ if (rc < 0) {
++ /*
++ * If we get an EHOSTDOWN error, this probably means that
++ * the the pending ARP entry has timed out for the host.
++ * Just ignore the error, and attempt a normal retry.
++ */
++ if (errno == EHOSTDOWN)
++ return 0;
++
+ PosixError("sendto failed");
+ }
+ job->status = ICMP_STATUS_GENERROR;
OpenPOWER on IntegriCloud