Skip Menu |
 

This queue is for tickets about the POE-Component-IRC CPAN distribution.

Report information
The Basics
Id: 48791
Status: resolved
Priority: 0/
Queue: POE-Component-IRC

People
Owner: Nobody in particular
Requestors: harv [...] ruin.nu
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 6.10
Fixed in: (no value)



Subject: localaddr() returns ip in the wrong format, breaks DCC.
Download (untitled) / with headers
text/plain 690b
localaddr is discovered in IRC.pm on line 380 with unpack_sockaddr_in, which gives an internal format for the ip: "the port and an opaque string representing the IP address (you can use inet_ntoa() to convert the address to the four-dotted numeric format)" Unfortunately inet_ntoa is not used to convert it into the normal "W.X.Y.Z" text format, so later uses of localaddr() are wrong. One example is DCC.pm line 191, here it tries to convert the already internalized ip once more, which ofc doesn't work, resulting in DCC SEND using 0.0.0.0 as ip. So, the fix is to either add an inet_ntoa() call to _sock_up() in IRC.pm, or remove the entire if-block on lines 191-193 in DCC.pm.
Good catch. It's been fixed now. 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.