Subject: | Unable to listen on IPv4 and IPv6 wildcard addresses |
Date: | Fri, 27 Feb 2015 13:19:21 -0500 |
To: | bug-IO-Socket-INET6 [...] rt.cpan.org |
From: | "William L. Thomson Jr." <wlt [...] o-sinc.com> |
There is an issue with listening on IPv4 and IPv6 wildcard addresses. You can listen on
one or the other but not both. Seems to think its already in use or something.
--------------------------------
my $socket_ipv4 = IO::Socket::INET6->new(Listen => 10,
LocalAddr => 0.0.0.0,
LocalPort => 6666);
my $socket_ipv6 = IO::Socket::INET6->new(Listen => 10,
LocalAddr => ::,
LocalPort => 6666);
print "SOCKET = $socket_ipv4\n";
print "SOCKET = $socket_ipv6\n";
--------------------------------
Result
SOCKET = IO::Socket::INET6=GLOB(0x7fd6c1ff4c30)
Use of uninitialized value $socket_ipv6 in concatenation (.) or string at ./ipv6_test.pl
line 24.
SOCKET =
$ netstat -lnp | grep 6666
tcp 0 0 0.0.0.0:6666 0.0.0.0:* LISTEN
2209/perl
If I change the order and do IPv6 before IPv4 then I get the following
Use of uninitialized value $socket_ipv4 in concatenation (.) or string at ./ipv6_test.pl
line 24.
SOCKET =
SOCKET = IO::Socket::INET6=GLOB(0x7fc049732c30)
$ netstat -lnp | grep 6666
tcp6 0 0 :::6666 :::* LISTEN 2217/perl
Please look into this so both IPv4 and IPv6 wildcards can be used at the same time.
Thank you!
--
William L. Thomson Jr.
Obsidian-Studios, Inc.
http://www.obsidian-studios.com
This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and is
protected by law. If you are not the intended recipient, you should
delete this message.
Any disclosure, copying, or distribution of this message, or the taking
of any action based on it, is strictly prohibited.