From 7a547b1b519892838ce8675895b651e4707d165d Mon Sep 17 00:00:00 2001 From: he Date: Mon, 2 Oct 2000 19:27:53 +0000 Subject: Open SNMP sockets with O_NONBLOCK (if available). In some odd cases scotty can end up calling recvfrom() twice in a row with no intervening select(), and can thus otherwise end up in a hang. Fix supplied by Juergen Schoenwalder, received in private communication. --- net/tcl-scotty/files/patch-sum | 3 ++- net/tcl-scotty/patches/patch-ae | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 net/tcl-scotty/patches/patch-ae (limited to 'net/tcl-scotty') diff --git a/net/tcl-scotty/files/patch-sum b/net/tcl-scotty/files/patch-sum index 8741ef4bade..4eadd658b32 100644 --- a/net/tcl-scotty/files/patch-sum +++ b/net/tcl-scotty/files/patch-sum @@ -1,6 +1,7 @@ -$NetBSD: patch-sum,v 1.1.1.1 2000/09/07 17:38:43 jwise Exp $ +$NetBSD: patch-sum,v 1.2 2000/10/02 19:27:53 he Exp $ MD5 (patch-aa) = 0609f277cf042b83dcd88f71cee32cb9 MD5 (patch-ab) = 208030196224c8d778a0fd7b85c7c3dd MD5 (patch-ac) = 7b8b4aa176cb87ef9ef2d08399f5ca9f MD5 (patch-ad) = d94ffd64f935a5e4531324d8c0d00050 +MD5 (patch-ae) = f83f4b94c298e36ae22704ee6072dd85 diff --git a/net/tcl-scotty/patches/patch-ae b/net/tcl-scotty/patches/patch-ae new file mode 100644 index 00000000000..00052094156 --- /dev/null +++ b/net/tcl-scotty/patches/patch-ae @@ -0,0 +1,28 @@ +$NetBSD: patch-ae,v 1.1 2000/10/02 19:27:54 he Exp $ + +--- tnmUnixSocket.c.orig Wed Sep 18 23:37:21 1996 ++++ tnmUnixSocket.c Mon Oct 2 21:07:45 2000 +@@ -13,6 +13,8 @@ + #include "tnmInt.h" + #include "tnmPort.h" + ++#include ++ + int + TnmSocket(domain, type, protocol) + int domain; +@@ -20,7 +22,13 @@ + int protocol; + { + int s = socket(domain, type, protocol); +- return (s < 0) ? TNM_SOCKET_ERROR : s; ++ return (s < 0) { ++ return TNM_SOCKET_ERROR; ++ } ++#ifdef O_NONBLOCK ++ fcntl(s, F_SETFL, O_NONBLOCK); ++#endif ++ return s; + } + + int -- cgit v1.2.3