lib/inet6.c:INET6_rresolve() - various fixes
1) Fall-back to numeric address if getnameinfo fails. Reverse lookup is not mandatory, therefore its fail is not an error. Just return numeric address in that case. This makes netstat/route show IPv6 address instead of [UNKNOWN] in case of DNS problems. 2) Pass length of 'name' buffer into function. 'name' is a pointer and therefore sizeof(name) returns size of pointer and not size of the buffer. see http://stackoverflow.com/questions/14298710/c-pointers-and-arrays-sizeof-operator The sizeof() usage was added with commit 604785ad, so I checked all the other changes in that commit and they seem to be OK. 3) remove unused 's' variable
Showing
Please register or sign in to comment