[TCPIP]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 7 Dec 2015 10:56:58 +0000 (10:56 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 7 Dec 2015 10:56:58 +0000 (10:56 +0000)
In case of localhost arping, fail if local interface isn't remote interface

svn path=/trunk/; revision=70285

reactos/drivers/network/tcpip/tcpip/dispatch.c

index 847b435..e5ef647 100644 (file)
@@ -1690,6 +1690,11 @@ NTSTATUS DispTdiQueryIpHwAddress( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STA
     if (Interface) {
         PVOID OutputBuffer;
 
+        if (!AddrIsUnspecified(&Local) && IPs[0] != IPs[1]) {
+            Status = STATUS_UNSUCCESSFUL;
+            goto Exit;
+        }
+
         if (Interface->AddressLength > IrpSp->Parameters.DeviceIoControl.OutputBufferLength) {
             Status = STATUS_INVALID_BUFFER_SIZE;
             goto Exit;