aboutsummaryrefslogtreecommitdiffstats
path: root/wintun.c
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-06-12 15:26:19 +0200
committerSimon Rozman <simon@rozman.si>2019-06-20 11:54:56 +0200
commitbce44d30e4c61f3bb5460f3da0f990cac3384ec5 (patch)
treeabf702e73cb1be0f2e608e452b9bf483d6aa0cbc /wintun.c
parentRestore adapter on PnP remove-cancel and reuse notification file object (diff)
downloadwintun-bce44d30e4c61f3bb5460f3da0f990cac3384ec5.tar.xz
wintun-bce44d30e4c61f3bb5460f3da0f990cac3384ec5.zip
Use more appropriate status when rejecting NBLs with no client connected
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'wintun.c')
-rw-r--r--wintun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wintun.c b/wintun.c
index 5eb558b..3786dc4 100644
--- a/wintun.c
+++ b/wintun.c
@@ -166,7 +166,7 @@ static NTSTATUS TunCheckForPause(_Inout_ TUN_CTX *ctx)
!(flags & TUN_FLAGS_PRESENT) ? STATUS_NDIS_ADAPTER_REMOVED :
!(flags & TUN_FLAGS_POWERED) ? STATUS_NDIS_LOW_POWER_STATE :
!(flags & TUN_FLAGS_ENABLED) ? STATUS_NDIS_PAUSED :
- InterlockedGet64(&ctx->Device.RefCount) <= 0 ? NDIS_STATUS_SEND_ABORTED :
+ InterlockedGet64(&ctx->Device.RefCount) <= 0 ? STATUS_NDIS_MEDIA_DISCONNECTED :
STATUS_SUCCESS;
}
@@ -852,7 +852,7 @@ static NTSTATUS TunDispatch(DEVICE_OBJECT *DeviceObject, IRP *Irp)
if (last_handle) {
if (ctx->MiniportAdapterHandle)
TunIndicateStatus(ctx->MiniportAdapterHandle, MediaConnectStateDisconnected);
- TunQueueClear(ctx, NDIS_STATUS_SEND_ABORTED);
+ TunQueueClear(ctx, STATUS_NDIS_MEDIA_DISCONNECTED);
}
IoReleaseRemoveLock(&ctx->Device.RemoveLock, stack->FileObject);