Paul Hampson - 2010-03-03

I just hit this problem as well.

The problem is that icmp.disassemble() is returning an object of type Unreachable, because it got an ICMP reply of ICMP_UNREACH, due to pinging a down host on the local LAN.

The code is failing to check that the ICMP packet that was successfully disassembled was indeed an EchoReply. It appears to be expecting a ValueError when given the wrong type of packet to decode, but the actual icmp module's classes only raise a ValueError if the contents of the packet don't match the type in their header.