RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1492760 - IO::Socket::IP->new() fails to listen on unspecified local address
Summary: IO::Socket::IP->new() fails to listen on unspecified local address
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl-IO-Socket-IP
Version: 7.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: perl-maint-list
QA Contact: Martin Kyral
URL:
Whiteboard:
Depends On:
Blocks: 1413065 1465904
TreeView+ depends on / blocked
 
Reported: 2017-09-18 15:06 UTC by Petr Pisar
Modified: 2018-04-10 08:41 UTC (History)
7 users (show)

Fixed In Version: perl-IO-Socket-IP-0.21-5.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 1413065
Environment:
Last Closed: 2018-04-10 08:41:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
First part of the upstream fix (3.67 KB, patch)
2017-09-18 16:35 UTC, Petr Pisar
no flags Details | Diff
Second part of the upstream fix (2.75 KB, patch)
2017-09-18 16:36 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CPAN 91982 0 None None None 2017-09-18 15:06:11 UTC
Red Hat Product Errata RHBA-2018:0665 0 None None None 2018-04-10 08:41:34 UTC

Description Petr Pisar 2017-09-18 15:06:11 UTC
+++ This bug was initially created as a clone of Bug #1413065 +++

--- Additional comment from Petr Pisar on 2017-09-18 14:57:10 GMT ---

(In reply to Petr Pisar from comment #16)
> I can introduce special handling for undef and empty string to behave as the
> previous implementation, but it's impossible to emulate all the other corner
> cases.
> 
Actually this does not work with perl-IO-Socket-IP-0.21-4.el7.noarch because that IO::Socket::IP cannot deal with non-existing LocalAddr argument:

$ perl -MIO::Socket::IP -e '$a=IO::Socket::IP->new(Proto=>q{tcp}, Listen=>1) or die qq{Error: $@\n}; print `ss -tnlp`'
Error: 

While it works with latest upstream IO-Socket-IP-0.39:

$ perl -MIO::Socket::IP -e '$a=IO::Socket::IP->new(Proto=>q{tcp}, Listen=>1) or die qq{Error: $@\n}; print `ss -tnlp`'
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128          *:22                       *:*                  
LISTEN     0      1           :::36309                   :::*                   users:(("perl",pid=13539,fd=3))
LISTEN     0      128         :::22                      :::*                  

This incompatibility was probably fixed in IO-Socket-IP-0.25 <https://rt.cpan.org/Public/Bug/Display.html?id=91982> and to be fixed in perl-IO-Socket-IP before we can proceed with this perl-HTTP-Daemon bug.

Comment 1 Petr Pisar 2017-09-18 16:35:48 UTC
Created attachment 1327541 [details]
First part of the upstream fix

Comment 2 Petr Pisar 2017-09-18 16:36:21 UTC
Created attachment 1327542 [details]
Second part of  the upstream fix

Comment 3 Petr Pisar 2017-09-18 16:46:53 UTC
How to test:

(1) Create a listening socket using IO::Socket::IP without specifying local address to bind:

$ perl -MIO::Socket::IP -e '$a=IO::Socket::IP->new(Proto=>q{tcp}, Listen=>1) or die qq{Error: $@}; print `ss -tnlp`'

Before: The program dies with an (empty) exception and no socket is created:

Error:  at -e line 1.

After: The call succeeds and the "ss" command reports a listing socket (IPv6 one if your system support IPv6):

State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128          *:875                      *:*                  
[...]
LISTEN     0      1           :::38121                   :::*                   users:(("perl",pid=4675,fd=3))

Here the the last line is the socket created by the perl program.

(2) You can check LocalAddr argument is still correctly honored:

$ perl -Ilib -MIO::Socket::IP -e '$a=IO::Socket::IP->new(Proto=>q{tcp}, Listen=>1, LocalAddr=>q{::1}) or die qq{Error: $@}; print `ss -tnlp`'
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      128          *:875                      *:*                  
[...]
LISTEN     0      1          ::1:56255                   :::*                   users:(("perl",pid=4677,fd=3))

Comment 10 errata-xmlrpc 2018-04-10 08:41:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0665


Note You need to log in before you can comment on or make changes to this bug.