}
if(hdr->ID != (Uint16)~hdr->Sequence) {
Warning("[ICMP ] ID and Sequence values do not match");
- return ;
+ //return ;
}
gICMP_PingSlots[hdr->ID].bArrived = 1;
break;
+ // -- 3: Destination Unreachable
+ case ICMP_UNREACHABLE:
+ switch(hdr->Code)
+ {
+ case 3: // Port Unreachable
+ Log("[ICMP ] Destination Unreachable (Port Unreachable)");
+ break;
+ default:
+ Log("[ICMP ] Destination Unreachable (Code %i)", hdr->Code);
+ break;
+ }
+// IPv4_Unreachable( Interface, hdr->Code, htons(hdr->Length)-sizeof(tICMPHeader), hdr->Data );
+ break;
+
// -- 8: Echo Request
case ICMP_ECHOREQ:
if(hdr->Code != 0) {
Log("[ICMP ] Checksum = 0x%04x", hdr->Checksum);
IPv4_SendPacket(Interface, *(tIPv4*)Address, 1, ntohs(hdr->Sequence), Length, hdr);
break;
+ default:
+ break;
}
}