Skip Menu |

This queue is for tickets about the Socket CPAN distribution.

Report information
The Basics
Id: 123253
Status: resolved
Priority: 0/
Queue: Socket

People
Owner: Nobody in particular
Requestors: marko.hrastovec [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.026



Subject: TCP_USER_TIMEOUT missing
Date: Thu, 12 Oct 2017 10:22:29 +0200
To: bug-Socket [...] rt.cpan.org
From: Marko Hrastovec <marko.hrastovec [...] gmail.com>
Hi, I would like to report an issue with Socket package in PERL. Since Linux 2.6.37 there is a socket option TCP_USER_TIMEOUT ( http://man7.org/linux/man-pages/man7/tcp.7.html), which can be set with setsockopt. I tried to set this option but I get the error that TCP_USER_TIMEOUT is not exported by Socket module. On the other hand, TCP_NODELAY and other (older) options work fine. Is there a workaround to use that option without being specified in Socket? I have checked /usr/include/linux/tcp.h while where USER_TCP_TIMEOUT is defined as: #define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ Can I just use 18 in setsockopt? I use several Linux distributions and different Socket versions provided with them. I have downloaded the latest *Socket 2.024* from CPAN and there is no trace of TCP_USER_TIMEOUT. One of the systems I have tested for this issue has the following details: $ perl -v This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi (with 58 registered patches, see perl -V for more detail) Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. $ uname -a Linux marko-HP2 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Kind Regards Marko
Show quoted text
> I would like to report an issue with Socket package in PERL. Since Linux > 2.6.37 there is a socket option TCP_USER_TIMEOUT ( > http://man7.org/linux/man-pages/man7/tcp.7.html), which can be set with > setsockopt. I tried to set this option but I get the error that > TCP_USER_TIMEOUT is not exported by Socket module. On the other hand, > TCP_NODELAY and other (older) options work fine.
Yes; they're all individually listed. Added by attached patch. Will be in 2.026 -- Paul Evans
Subject: rt123253.patch
=== modified file 'Makefile.PL' --- Makefile.PL 2018-01-11 22:49:19 +0000 +++ Makefile.PL 2018-01-11 22:54:51 +0000 @@ -231,7 +231,8 @@ TCP_FASTOPEN TCP_INFO TCP_INIT_CWND TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXRT TCP_MAXSEG TCP_MD5SIG TCP_NODELAY TCP_NOOPT TCP_NOPUSH TCP_QUICKACK - TCP_SACK_ENABLE TCP_STDURG TCP_SYNCNT TCP_WINDOW_CLAMP + TCP_SACK_ENABLE TCP_STDURG TCP_SYNCNT TCP_USER_TIMEOUT + TCP_WINDOW_CLAMP UIO_MAXIOV ), === modified file 'Socket.pm' --- Socket.pm 2018-01-09 15:14:39 +0000 +++ Socket.pm 2018-01-11 22:54:51 +0000 @@ -783,7 +783,8 @@ TCP_FASTOPEN TCP_INFO TCP_INIT_CWND TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXRT TCP_MAXSEG TCP_MD5SIG TCP_NODELAY TCP_NOOPT TCP_NOPUSH TCP_QUICKACK - TCP_SACK_ENABLE TCP_STDURG TCP_SYNCNT TCP_WINDOW_CLAMP + TCP_SACK_ENABLE TCP_STDURG TCP_SYNCNT TCP_USER_TIMEOUT + TCP_WINDOW_CLAMP IN6ADDR_ANY IN6ADDR_LOOPBACK
Released -- Paul Evans