Ethernet DNSClient returning garbage IP

I’ve been having issues connecting to a couple of websites, I’ve traced it down to the DNSClient returning garbage addresses if for some reason it can’t connect to the DNS server. I’ve got the below code running on a Freetronic’s Etherten (Uno), the below code responds with the IP of, even though I don’t even have a network cable plugged in to the Etherten.

A few website’s I’ve tried respond with a random number in the first octet, but other sites are returning as I would expect. One such example is “”, returning This code, without a network cable plugged in always returns on the first and second try for “

This code is being run on OSX 1.0.5, but I’ve also had my main program code do this, using Window’s 1.0.4 of the arduino software. My main program seems to only do it, when the net is being flakey, otherwise it works fine.

Note: This is the 4th Etherten I’ve tried that is exhibiting this behaviour, and all of them have done it so far.

Anyone able to shed some light on this please? I’m guessing at a memory leak somewhere, but nothing has jumped out at me yet.

#include <Ethernet.h>
#include <Dns.h>
#include <SPI.h>

byte MAC[6] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress IP(10, 3, 1, 201);
IPAddress GATEWAY(10, 3, 1, 1);
IPAddress DNS(8, 8, 8, 8);
IPAddress SUBNET(255, 255, 255, 0);

unsigned long dns_loop_retry = 0UL;
IPAddress dnsIP1 = INADDR_NONE;
IPAddress dnsIP2 = INADDR_NONE;
boolean dnsGood = false;

void setup()
  Ethernet.begin(MAC, IP, DNS, GATEWAY, SUBNET);

void loop()
  if (!dnsGood && millis() - dns_loop_retry > 1000UL) {
    DNSClient dns;
    if (dnsIP1 == INADDR_NONE) {
      dns.getHostByName("", dnsIP1);
      Serial.print("1: ");
    } else {
      dns.getHostByName("", dnsIP2);
      Serial.print("2: ");
    if (!(dnsIP1 == INADDR_NONE) && dnsIP1 == dnsIP2) {
      //Serial << "PVOutput IP: " << PVOutputIP1 << endl;
      //xprintf("PVOutput IP: %s\n", PVOutputIP1);
      Serial.print("PVOutput IP: ");
      dnsGood = true;
    dns_loop_retry = millis();

Bump, anyone at least get a similar result as to what I'm getting?