Skip Menu |
 

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 75731
Status: open
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: Nobody in particular
Requestors: trond [...] thaugen.no
Cc:
AdminCc:

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



Subject: $c->req->hostname is empty for an ipv6-client
Download (untitled) / with headers
text/plain 443b
Catalyst::Request seems to call gethostbyaddr to determine the hostname of a calling client. This works OK for ipv4 clients, but I have problems using a ipv6 client, in which case the $c->req->hostname becomes undef. A bit of googling tells me that some adaptions may be needed for IPV6: http://long.ccaba.upc.es/long/045Guidelines/eva/ipv6.html Perhaps you could try to use of the new 'getaddrinfo' and 'getnameinfo' to be more portable?
Download (untitled) / with headers
text/plain 576b
On Tue Mar 13 06:03:22 2012, TROHAU wrote: Show quoted text
> Catalyst::Request seems to call gethostbyaddr to determine the hostname > of a calling client. This works OK for ipv4 clients, but I have problems > using a ipv6 client, in which case the $c->req->hostname becomes undef. > > A bit of googling tells me that some adaptions may be needed for IPV6: > http://long.ccaba.upc.es/long/045Guidelines/eva/ipv6.html > > Perhaps you could try to use of the new 'getaddrinfo' and 'getnameinfo' > to be more portable?
You're entirely correct here. A patch to fix this would be welcome :)
A proposed patch is now in the branch bugs/rt-75731. Please review and merge.
Download (untitled) / with headers
text/plain 305b
On Mon Jan 18 08:04:33 2016, ABRAXXA wrote: Show quoted text
> A proposed patch is now in the branch bugs/rt-75731. > Please review and merge.
So I believe I $ git clone git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git $ git checkout bugs/rt-75731 $ git diff master...HEAD Reviewing now... -- Paul Evans
Download (untitled) / with headers
text/plain 345b
On Mon Sep 12 15:18:32 2016, PEVANS wrote: Show quoted text
> Reviewing now...
Hm. First comment: Why NI_DGRAM? I believe this is a TCP socket, not a UDP one. Also, that won't have any effect on the hostname result; it's there only to distinguish between some services that differ between UDP and TCP (e.g. some Windows netbios-related things). -- Paul Evans
Download (untitled) / with headers
text/plain 154b
Ah, also: the NIx_NOSERV flag is a flag for the separate $xflags argument; it's an extension on top of the normal C-level flags argument. -- Paul Evans
Download (untitled) / with headers
text/plain 129b
The branch includes all fixes which we discussed on IRC, please review and comment if it can be merged to master as is, thanks!


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.