NET-SNMP version: 5.5
Scientific Linux 6.3
Not sure if this is really a bug or just an IPv4-centric 'feature'. When specifying a hostname that only resolves to an IPv6 address to the various utils such as snmpwalk, the util complains that getaddrinfo cannot resolve the hostname and aborts.
[tony@sol ~]$ snmpwalk bunker003.manaikaika.com
No log handling enabled - turning on stderr logging
getaddrinfo: bunker003.manaikaika.com Name or service not known
snmpwalk: Unknown host (bunker003.manaikaika.com)
Of course this works if udp6: is explicitly added as a prefix to the hostname. However, in the absense of an explicit protocol shouldn't the above just work for IPv6-only hosts?
Yes, that does not look right ... luckily not many systems are IPv6 only :-)
The attached patch hopefully fixes that
/Niels
Is it a good idea to "#if 0" error logging altogether? What if the error returned when trying the first transport is the one you actually want to have logged?
Well, my first thought was, that this deep down library routine should certainly not log anything by itself.
Second, I cannot immediately see any significant difference between the error from the first getaddrinfo call, and the second?
Can you come up with an example where it makes a difference? I am all open, this was just a first hack to solve the original problem!
On Sat, 9 Feb 2013, Niels Baggesen wrote:
Works. Thanks!
Antonio Querubin
e-mail: tony@lavanauts.org
xmpp: antonioquerubin@gmail.com
The problem has now been fixed in the V 5.7 and trunk branches.