Date: Wed, 7 Feb 2001 16:04:04 -0500 (EST) From: louie@transsys.com To: FreeBSD-gnats-submit@freebsd.org, ozz@FreeBSD.org.ru Subject: ports/24940: ports net/scotty3 bug with Tnm::icmp command and nmicmpd Message-ID: <200102072104.f17L44r09000@sayshell.research.uu.net>
next in thread | raw e-mail | index | archive | help
>Number: 24940 >Category: ports >Synopsis: prolem with Tnm::icmp echo command due to nmicmpd bug >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 07 13:10:03 PST 2001 >Closed-Date: >Last-Modified: >Originator: Louis Mamakos >Release: FreeBSD 4.2-STABLE i386 >Organization: >Environment: 4.2-STABLE >Description: In the scotty Tnm package, a standalone daemon, nmicmpd, is used on behalf of user programs to send and receive ICMP messages. This is used by the Tnm::icmp echo command, which is used by tkined. 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. >How-To-Repeat: as described above >Fix: When an EHOSTDOWN error occurs, just ignore it, and wait for a subsequent higher-level retransmit or timeout to declare the host dead. This has also been reported to the author of the package, though the FreeBSD port isn't tracking the HEAD of his repository where the fix is likely to appear, and very few "releases" of this branch seem to be made. --- unix/nmicmpd.c.orig Tue Feb 6 15:34:03 2001 +++ unix/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; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102072104.f17L44r09000>