DHCP hang issue

Hi

I am seeing hangs on Ethernet.begin(mac).
It looks like device is polling on parseDHCPResponse(..).

When I add exit on endOption case, it works fine.
I think we need to exit the while loop when we see the endOption case.
But the code does not exit and keeps checking the Udp input and it caused DHCP spinning on UDP RX.

When I add a force exit when it sees endOption, it works fine.
Can somebody check whether my theory is right and update the ethernet library?

(In DHCP.cpp)

while (_dhcpUdpSocket.available() > 0)
{
read_value = _dhcpUdpSocket.read();
Serial.print("\nread");
Serial.print(read_value);
//switch (_dhcpUdpSocket.read())
switch (read_value)
{
case endOption :
Serial.println(" endOption"); //test print
goto EXIT; // my solution..
break;
--(omitted)--

EXIT:
// Need to skip to end of the packet regardless here
_dhcpUdpSocket.flush();

return type;

See if using the newest version (v1.0.1) cures that problem. The download links are here:

IDE v0022 through v1.0 had problems locking up with any call to available().

Insure you disable or initialize the SD SPI interface if your device has one.

It works well on v.1.0.1.

Thanks