Modules/IPStack - Fixed clobbering of destination MAC
authorJohn Hodge <[email protected]>
Sat, 10 Aug 2013 12:07:28 +0000 (20:07 +0800)
committerJohn Hodge <[email protected]>
Sat, 10 Aug 2013 12:07:28 +0000 (20:07 +0800)
KernelLand/Modules/IPStack/link.c

index d92504b..ee7ad12 100644 (file)
@@ -93,7 +93,7 @@ void Link_SendPacket(tAdapter *Adapter, Uint16 Type, tMacAddr To, tIPStackBuffer
        hdr->Dest = To;
        memcpy(&hdr->Src, Adapter->HWAddr, 6);  // TODO: Remove hard coded 6
        hdr->Type = htons(Type);
-       memset(hdr, 0, ofs+4);  // zero padding and checksum
+       memset(hdr+1, 0, ofs+4);        // zero padding and checksum
 
        if( (Adapter->Type->Flags & ADAPTERFLAG_OFFLOAD_MAC) )
                IPStack_Buffer_AppendSubBuffer(Buffer, sizeof(tEthernetHeader), ofs, hdr, NULL, NULL);

UCC git Repository :: git.ucc.asn.au