Skip Menu |

This queue is for tickets about the Net-Syslog CPAN distribution.

Report information
The Basics
Id: 99266
Status: new
Priority: 0/
Queue: Net-Syslog

People
Owner: Nobody in particular
Requestors: alexz [...] opmantek.com
Cc:
AdminCc:

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



Subject: net::syslog send: causes inet_ntoa usage error outputs if name resolution fails
Date: Thu, 02 Oct 2014 11:31:53 +1000
To: bug-Net-Syslog [...] rt.cpan.org
From: Alexander Zangerl <alexz [...] opmantek.com>
line 101/102 of the module passes the output of gethostbyname(hostname) straight through to inet_ntoa, which produces this error message "Usage: Socket::inet_ntoa(ip_address_sv) at /usr/local/share/perl5/Net/Syslog.pm line 101." if the name to ip resolution did not succeed (eg. temporary dns outage, no /etc/hosts entry) as gethostbyname returns an empty array in that case. i think the simplest workaround for this would be to fall back to use the unresolved hostname straight; rfc3164 does allow either hostname or ip address (section 4.1.2). regards az -- Alexander Zangerl email: alexz@opmantek.com skype: alex.zangerl mobile: +61 415 482 341 web: https://community.opmantek.com/