mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
[TCPIP]
Fix the last failing tests of iphlpapi_apitest:SendARP svn path=/trunk/; revision=70323
This commit is contained in:
parent
d8e9559dd9
commit
a6577878cb
1 changed files with 7 additions and 9 deletions
|
@ -1645,7 +1645,7 @@ WaitForHwAddress ( PDEVICE_OBJECT DeviceObject, PVOID Context) {
|
||||||
PVOID OutputBuffer;
|
PVOID OutputBuffer;
|
||||||
|
|
||||||
if (NCE->LinkAddressLength > WorkItem->IrpSp->Parameters.DeviceIoControl.OutputBufferLength) {
|
if (NCE->LinkAddressLength > WorkItem->IrpSp->Parameters.DeviceIoControl.OutputBufferLength) {
|
||||||
Status = STATUS_INVALID_BUFFER_SIZE;
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
} else {
|
} else {
|
||||||
OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
|
OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
RtlCopyMemory(OutputBuffer, NCE->LinkAddress, NCE->LinkAddressLength);
|
RtlCopyMemory(OutputBuffer, NCE->LinkAddress, NCE->LinkAddressLength);
|
||||||
|
@ -1691,13 +1691,8 @@ NTSTATUS DispTdiQueryIpHwAddress( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STA
|
||||||
if (Interface) {
|
if (Interface) {
|
||||||
PVOID OutputBuffer;
|
PVOID OutputBuffer;
|
||||||
|
|
||||||
if (!AddrIsUnspecified(&Local) && IPs[0] != IPs[1]) {
|
|
||||||
Status = STATUS_UNSUCCESSFUL;
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Interface->AddressLength > IrpSp->Parameters.DeviceIoControl.OutputBufferLength) {
|
if (Interface->AddressLength > IrpSp->Parameters.DeviceIoControl.OutputBufferLength) {
|
||||||
Status = STATUS_INVALID_BUFFER_SIZE;
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1719,11 +1714,14 @@ NTSTATUS DispTdiQueryIpHwAddress( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STA
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Interface = AddrLocateInterface(&Local);
|
Interface = AddrLocateInterface(&Local);
|
||||||
|
if (Interface == NULL) {
|
||||||
|
Interface = GetDefaultInterface();
|
||||||
if (Interface == NULL) {
|
if (Interface == NULL) {
|
||||||
Status = STATUS_NETWORK_UNREACHABLE;
|
Status = STATUS_NETWORK_UNREACHABLE;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WorkItem = ExAllocatePoolWithTag(PagedPool, sizeof(QUERY_HW_WORK_ITEM), QUERY_CONTEXT_TAG);
|
WorkItem = ExAllocatePoolWithTag(PagedPool, sizeof(QUERY_HW_WORK_ITEM), QUERY_CONTEXT_TAG);
|
||||||
if (WorkItem == NULL) {
|
if (WorkItem == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue