diff options
author | he <he@pkgsrc.org> | 2000-10-02 19:27:53 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2000-10-02 19:27:53 +0000 |
commit | 39e2ba40dfaddec6ddc03384431ac19f1c7014cf (patch) | |
tree | 0b3b61055d7e8424b9e2c6bc243c825720dce4d2 /net/tcl-scotty | |
parent | 54a7d474fc4ecac493125efcc5c9e8c9c17367ef (diff) | |
download | pkgsrc-39e2ba40dfaddec6ddc03384431ac19f1c7014cf.tar.gz |
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.
Diffstat (limited to 'net/tcl-scotty')
-rw-r--r-- | net/tcl-scotty/files/patch-sum | 3 | ||||
-rw-r--r-- | net/tcl-scotty/patches/patch-ae | 28 |
2 files changed, 30 insertions, 1 deletions
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 <fcntl.h> ++ + 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 |