mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 07:35:10 +00:00
- Move the DstAddress check above the NCE modification code so we don't use ARP requests that aren't addressed to us
- Fixes bug 4879 svn path=/trunk/; revision=43692
This commit is contained in:
parent
80078ade2b
commit
0fba4d8f11
|
@ -212,11 +212,13 @@ VOID ARPReceive(
|
|||
SenderProtoAddress = (PVOID)((ULONG_PTR)SenderHWAddress + Header->HWAddrLen);
|
||||
TargetProtoAddress = (PVOID)((ULONG_PTR)SenderProtoAddress + Header->ProtoAddrLen + Header->HWAddrLen);
|
||||
|
||||
/* Check if we know the sender */
|
||||
AddrInitIPv4(&DstAddress, *((PULONG)TargetProtoAddress));
|
||||
if (!AddrIsEqual(&DstAddress, &Interface->Unicast))
|
||||
return;
|
||||
|
||||
AddrInitIPv4(&SrcAddress, *((PULONG)SenderProtoAddress));
|
||||
AddrInitIPv4(&DstAddress, *((PULONG)TargetProtoAddress));
|
||||
|
||||
/* Check if we know the sender */
|
||||
NCE = NBLocateNeighbor(&SrcAddress);
|
||||
if (NCE) {
|
||||
/* We know the sender. Update the hardware address
|
||||
|
@ -230,8 +232,7 @@ VOID ARPReceive(
|
|||
Header->HWAddrLen, 0, ARP_TIMEOUT);
|
||||
}
|
||||
|
||||
if (Header->Opcode != ARP_OPCODE_REQUEST ||
|
||||
!AddrIsEqual(&DstAddress, &Interface->Unicast))
|
||||
if (Header->Opcode != ARP_OPCODE_REQUEST)
|
||||
return;
|
||||
|
||||
/* This is a request for our address. Swap the addresses and
|
||||
|
|
Loading…
Reference in a new issue