From a6577878cb8372f9096e7ddefeb96278e467cfec Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Fri, 11 Dec 2015 22:30:02 +0000 Subject: [PATCH] [TCPIP] Fix the last failing tests of iphlpapi_apitest:SendARP svn path=/trunk/; revision=70323 --- reactos/drivers/network/tcpip/tcpip/dispatch.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/reactos/drivers/network/tcpip/tcpip/dispatch.c b/reactos/drivers/network/tcpip/tcpip/dispatch.c index 6d77970a241..8c0b0f526b8 100644 --- a/reactos/drivers/network/tcpip/tcpip/dispatch.c +++ b/reactos/drivers/network/tcpip/tcpip/dispatch.c @@ -1645,7 +1645,7 @@ WaitForHwAddress ( PDEVICE_OBJECT DeviceObject, PVOID Context) { PVOID OutputBuffer; if (NCE->LinkAddressLength > WorkItem->IrpSp->Parameters.DeviceIoControl.OutputBufferLength) { - Status = STATUS_INVALID_BUFFER_SIZE; + Status = STATUS_INSUFFICIENT_RESOURCES; } else { OutputBuffer = Irp->AssociatedIrp.SystemBuffer; RtlCopyMemory(OutputBuffer, NCE->LinkAddress, NCE->LinkAddressLength); @@ -1691,13 +1691,8 @@ 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; + Status = STATUS_INSUFFICIENT_RESOURCES; goto Exit; } @@ -1720,8 +1715,11 @@ NTSTATUS DispTdiQueryIpHwAddress( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STA else { Interface = AddrLocateInterface(&Local); if (Interface == NULL) { - Status = STATUS_NETWORK_UNREACHABLE; - goto Exit; + Interface = GetDefaultInterface(); + if (Interface == NULL) { + Status = STATUS_NETWORK_UNREACHABLE; + goto Exit; + } } } -- 2.17.1