Your message dated Sun, 10 May 2015 21:55:53 +0000
with message-id <[email protected]>
and subject line Bug#780196: fixed in tcputils 0.6.2-10
has caused the Debian Bug report #780196,
regarding tcputils: tcpconnect hangs, fix ioctl argument
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
780196: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780196
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tcputils
Severity: important
Tags: patch

Dear Maintainer,

Under certain situations tcpconnect hangs and does not read replies from
remote peer.  For example, on an up-to-date jessie system (amd64):

$ tcpconnect www.debian.org http
GET / HTTP/1.1
Host: www.debian.org


^C

In fact, strace shows that tcpconnect keeps trying to read more data
from stdin.

I think that the origin for the problem is in function available_bytes()
[relay.c] where a long* argument is given to ioctl(FIONREAD), while an
int* is expected.  Then, e.g. on amd64 where long != int, nbytes is only
partially initialized by the ioctl call.

The following patch fixes that.

Regards,
        Arnaud Giersch

========================================================================
--- relay.c.BAK 2015-03-10 09:50:27.000000000 +0100
+++ relay.c     2015-03-10 10:32:23.665199079 +0100
@@ -24,10 +24,10 @@
 /*
  *  Estimate how many bytes are available for reading on a file descriptor.
  */
-static long
+static int
 available_bytes(int fd)
 {
-    long         nbytes;
+    int                  nbytes;
     struct stat          sb;
     off_t        pos;
 
@@ -117,7 +117,7 @@ relay_once(struct relay             * relays,
     {
        if (FD_ISSET(relays[i].source, &readset))
        {
-           long  unread = available_bytes(relays[i].source);
+           int  unread = available_bytes(relays[i].source);
            do 
            {
                char buffer[8192];
========================================================================

--- End Message ---
--- Begin Message ---
Source: tcputils
Source-Version: 0.6.2-10

We believe that the bug you reported is fixed in the latest version of
tcputils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joel Rosdahl <[email protected]> (supplier of updated tcputils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 10 May 2015 22:43:57 +0200
Source: tcputils
Binary: tcputils
Architecture: source amd64
Version: 0.6.2-10
Distribution: unstable
Urgency: medium
Maintainer: Joel Rosdahl <[email protected]>
Changed-By: Joel Rosdahl <[email protected]>
Description:
 tcputils   - Utilities for TCP programming in shell-scripts
Closes: 780196
Changes:
 tcputils (0.6.2-10) unstable; urgency=medium
 .
   * Switch to dpkg-source 3.0 (quilt) format
   * Convert Debian changes to patches
   * Bump Standards-Version to 3.9.6
   * Add .gitignore
   * Use debhelper 9
   * Add watch file
   * Enable hardening
   * Add man pages for binaries
   * Fix unescaped minus in tcpbug man page
   * Fix ioctl argument type in relay.c (closes: #780196)
Checksums-Sha1:
 cc5c446329a042b3b2ebf50d790d5e61670925ed 1644 tcputils_0.6.2-10.dsc
 9972365528bd59b01c1622907f9a0c0e65218a06 3716 tcputils_0.6.2-10.debian.tar.xz
 d7a0ee5062820fc14b2d448c8563d10baef53efc 17314 tcputils_0.6.2-10_amd64.deb
Checksums-Sha256:
 fa896184a021db58da92b6b04962ce713af046dad87178c8c1d05f587313043d 1644 
tcputils_0.6.2-10.dsc
 d609ab15297bee73b689e0917564b689ad01c18b9c1c465a3db4ca72e1989579 3716 
tcputils_0.6.2-10.debian.tar.xz
 13361da31bdb7b53a2838a32f475b7bbd094e8e6ae18ac4af0327b0c9f60ed9f 17314 
tcputils_0.6.2-10_amd64.deb
Files:
 7df0c9e6efb7f9470860fbf133edd319 1644 net optional tcputils_0.6.2-10.dsc
 ce5d6d0dfde9c9e06a00e1849ebcd9a1 3716 net optional 
tcputils_0.6.2-10.debian.tar.xz
 0cf0873fe696e4a2a7670887293b0435 17314 net optional tcputils_0.6.2-10_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVT8PLAAoJEJlt2gdVlK24ILAP+gNx8ZZX4z3nmYZZzSmPU1n0
XYm9JNFj5m8+YsgNqleKFsb2zCIQFGXIls9U+iETraORc2eTXkzYcifnMlukuWJ1
F6h7VzmK+SGem5Lu/UGUR9koqLDwrkUSYaM1duHAQYypakAyiW+aiXIdYYJblReQ
pur2iRXDKO0WQd53zCTOr1ePyzK/l9U8JbrEBTDyLR5w6OSO3NZBZdgcxEq8JYTr
MNWNYEwCWxT3gCQ5LAy+udj8AaxaH8Zi+XrYw2Ye03DbYDZIzv6cQWOxYLmPJXfm
uPpUKohVfXkbFyB5YlMI6PeZ1Yjgigv0TT/sxPdRjbotLAFQ7N28nibTfujNm5ZM
pQOiT/YN+41atDLM0yOekKDNOS0SN6WYOMmrRA9NWlOj+sZBGe8W2bwVh6yB9DCu
70/ZicOFA/ykKTPQqRvewWl5cfJ/jCnla6trmo+IrmNEx6k+t1YOP9cKSgsKGEjx
FTz0D+cJI/Q+crzOkuF+PriZsjx/iAp8aTCpeS3h1chG7F542nT+kj3DTZF95eUn
0IGP9h0aKy6NI7KFi8Ym3bnledw78+LVKVsxAhEtIQ5w+f8TRgfkQwOByCQvLURA
VlmHUcuKTjGmCoB2ZX1Sy0sQup3FKi3y99fk1dWKo9w3T9IPdrNmSEe4/QFlqsdk
qsIoRiWcMwatTDIbBKUY
=wA26
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to