Skip Menu |

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

Report information
The Basics
Id: 65829
Status: resolved
Worked: 5 min
Priority: 0/
Queue: POE-Component-Server-Syslog

People
Owner: Nobody in particular
Requestors: ben [...] desync.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.18
Fixed in: 1.20



Subject: no access to source address
The source address of messages is unavailable if it can't be resolved. The 'host' attribute of messages is also set to an arbitrary string if resolution fails.
Subject: addr.patch
--- /usr/local/lib/perl5/site_perl/5.10.1/POE/Component/Server/Syslog/UDP.pm 2009-05-28 04:34:51.000000000 -0400 +++ lib/POE/Component/Server/Syslog/UDP.pm 2011-02-17 07:15:01.249948940 -0500 @@ -120,13 +120,11 @@ while( ($records = $_[HEAP]->{filter}->get_one()) and (@$records > 0)) { if(defined $records and ref $records eq 'ARRAY') { foreach my $record (@$records) { - if( ( sockaddr_in( $remote_socket ) )[1]) { - $record->{host} = gethostbyaddr( - ( sockaddr_in( $remote_socket ) )[1], - AF_INET, - ); - } else { - $record->{host} = '[unknown]'; + if (my $addr = (sockaddr_in($remote_socket))[1]) { + $record->{addr} = inet_ntoa($addr); + if (my $host = gethostbyaddr($addr, AF_INET)) { + $record->{host} = $host; + } } $_[KERNEL]->yield( 'client_input', $record ); @@ -300,9 +298,13 @@ The "severity" number decoded from the pri. +=item * addr + +The remote address of the source in dotted-decimal notation. + =item * host -The host that sent the message. +The hostname of the source, if available. =item * msg
Subject: Re: [rt.cpan.org #65829] no access to source address
Date: Thu, 17 Feb 2011 16:39:37 +0000
To: ben wilber via RT <bug-POE-Component-Server-Syslog [...] rt.cpan.org>
From: "Chris 'BinGOs' Williams" <chris [...] bingosnet.co.uk>
On Thu, Feb 17, 2011 at 07:24:16AM -0500, ben wilber via RT wrote: Show quoted text
> Thu Feb 17 07:24:16 2011: Request 65829 was acted upon. > Transaction: Ticket created by ben@desync.com > Queue: POE-Component-Server-Syslog > Subject: no access to source address > Broken in: 1.18 > Severity: Normal > Owner: Nobody > Requestors: ben@desync.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65829 > > > > The source address of messages is unavailable if it can't be resolved. The 'host' attribute of > messages is also set to an arbitrary string if resolution fails. > >
Thanks, applied and released as version 1.20 to CPAN. -- Chris Williams aka BinGOs PGP ID 0x4658671F http://www.gumbynet.org.uk ==========================
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

On Thu Feb 17 11:39:54 2011, chris@bingosnet.co.uk wrote: Show quoted text
> On Thu, Feb 17, 2011 at 07:24:16AM -0500, ben wilber via RT wrote:
> > Thu Feb 17 07:24:16 2011: Request 65829 was acted upon. > > Transaction: Ticket created by ben@desync.com > > Queue: POE-Component-Server-Syslog > > Subject: no access to source address > > Broken in: 1.18 > > Severity: Normal > > Owner: Nobody > > Requestors: ben@desync.com > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65829 > > > > > > > The source address of messages is unavailable if it can't be > > resolved. The 'host' attribute of > > messages is also set to an arbitrary string if resolution fails. > > > >
> > Thanks, applied and released as version 1.20 to CPAN.
Setting as resolved.