Skip Menu |

This queue is for tickets about the RPC-XML CPAN distribution.

Report information
The Basics
Id: 120472
Status: open
Priority: 0/
Queue: RPC-XML

Owner: rjray [...]
Requestors: ppisar [...]

Bug Information
Severity: Important
Broken in: 0.80
Fixed in: (no value)


Subject: IPv6 support
Download (untitled) / with headers
text/plain 2.4k
When HTTP::Daemon supports IPv6 <>, RPC-XML-0.80 t/40_server.t test will fail like this: not ok 19 - RPC::XML::Server::url method (set) # Failed test 'RPC::XML::Server::url method (set)' # at t/40_server.t line 187. # 'http://[::1]:42761/' # doesn't match '(?^:http://(127[.]0[.]0[.]1|localhost|localhost[.]localdomain|localhost4|localhost4[.]localdomain4|localhost[.]localdomain|localhost6|localhost6[.]localdomain6):42761)' and Not an ARRAY reference at t/40_server.t line 332. # Looks like your test exited with 255 just after 43. The first failure can be easily fixed (I have a patch), but the second is one is more troublesome. It crashes on: $res = $res->value->value; → is($res->[2], inet_ntoa(inet_aton('localhost')), because localhost resolves to ::1 IPv6 address and inet_ntoa supports IPv4 only. This could be also corrected, by the issue with $res whose values come from code: $res = $srv->add_method({ name => 'perl.test.suite.peeraddr', signature => [ 'array' ], code => sub { my $server = shift; my $ipaddr = inet_aton($server->{peerhost}); my $peeraddr = RPC_BASE64 $server->{peeraddr}; my $packet = pack_sockaddr_in($server->{peerport}, $ipaddr); $packet = RPC_BASE64 $packet; [ $peeraddr, $packet, $server->{peerhost}, $server->{peerport} ]; } }); and especially $server->{peeraddr} is documented in RPC::XML as: peeraddr This is the address part of a packed SOCKADDR_IN structure, as returned by "pack_sockaddr_in" in Socket, which contains the address That means the documentation explicitly allows only IPv4 addresses. How could this be fixed? It's good to know that "an address part of a packaged structure" itself is useless because one needs to know address family to interpret it correctly. One could add new $server->{family} element to carry address family. Or one could change the $server->{peeraddr} meaning to deliver complete packed structure including IP address, port, and address family (output of pack_sockaddr_in or pack_sockaddr_in6). I have not yet studied Net::Server how it deals with it.
From: ppisar [...]
Download (untitled) / with headers
text/plain 227b
Dne St 01.bře.2017 11:39:09, ppisar napsal(a): Show quoted text
> When HTTP::Daemon supports IPv6 > <>, RPC-XML-0.80 > t/40_server.t test will fail like this: >
Attached patch should fix it.
Subject: RPC-XML-0.80-IPv6-support.patch

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 153b
Thanks for the report and the patch. I'll examine it and integrate it as soon as I can! Randy -- Randy J. Ray

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to