end = ts + Interface->TimeoutDelay;
while( !gICMP_PingSlots[i].bArrived && now() < end) Threads_Yield();
- ts = now() - ts;
- if(ts > Interface->TimeoutDelay)
+ if(now() > end)
return -1;
return (int)ts;
int IPv4_SendPacket(tInterface *Iface, tIPv4 Address, int Protocol, int ID, int Length, const void *Data)
{
tMacAddr to = ARP_Resolve4(Iface, Address);
+ const tMacAddr zero = {{0,0,0,0,0,0}};
int bufSize = sizeof(tIPv4Header) + Length;
char buf[bufSize];
tIPv4Header *hdr = (void*)buf;
int ret;
+ if( MAC_EQU(to, zero) ) {
+ return 0;
+ }
+
// OUTPUT Firewall rule go here
ret = IPTablesV4_TestChain("OUTPUT",
(tIPv4*)Iface->Address, &Address,