arduino/Arduino — pull request #2499 by jhorck (2014-12-15 00:18:30+00:00)
Title: Update Dns.cpp

I found a bug in DNSClient::getHostByName() and fixed it.

I'm trying to connect to a local server, called 'htpc'. The hostname is resolved by DNSClient::getHostByName(). The first thing this function does is "See if it's a numeric IP address" by calling inet_aton(). It returns falsely 1 (=yes, it's a numeric IP address) for hostname 'htpc'

For most (longer) hostnames it will accidentally return 0. This is probably why it hasn't been discovered before.

- valid IP address digits have to be >= 0 AND <= 9
- valid IP addresses must have 4 segments