Skip Menu |

This queue is for tickets about the AnyEvent CPAN distribution.

Report information
The Basics
Id: 62003
Status: resolved
Priority: 0/
Queue: AnyEvent

People
Owner: Nobody in particular
Requestors: isaacson [...] cpan.org
Cc:
AdminCc:

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



Subject: AnyEvent::DNS parses nameserver lines too strictly
AnyEvent::DNS's parsing of nameserver lines in /etc/resolv.conf is stricter than glibc's. In my environment the generation process adds the hostname as a "comment": nameserver 1.2.3.4 ; foo I'm not sure if this is documented anywhere as supported, but it works because glibc (in res_init) will take everything after the "nameserver " and pass it to inet_aton; inet_aton happily ignores anything after the address, so inet_aton("1.2.3.4 ; foo") returns the properly packed address. The specific workaround for this is probably to relax this regex in AnyEvent/DNS.pm: old: if (/^\s*nameserver\s+(\S+)\s*$/i) { new: if (/^\s*nameserver\s+(\S+)/i) { Also, glibc recognizes ";" as a valid comment character, in addition to "#", so another option would be to do the same: old: s/#.*$//; # not quite legal, but many people insist new: s/[#;].*$//; # not quite legal, but many people insist
The owner indicated by e-mail that this will be resolved in the next release. Closing ticket upon request.