From a83e6a310119e349e88b76410fd0318251559751 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Fri, 10 Nov 2017 17:19:54 +0500 Subject: [PATCH] Driver: Debug print on log buffer underflow. --- src/driver/fortdrv.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/driver/fortdrv.c b/src/driver/fortdrv.c index f967090d..ffe2335a 100644 --- a/src/driver/fortdrv.c +++ b/src/driver/fortdrv.c @@ -199,9 +199,14 @@ fort_callout_classify_v4 (const FWPS_INCOMING_VALUES0 *inFixedValues, NTSTATUS irp_status; ULONG_PTR info; - fort_buffer_blocked_write(&g_device->buffer, remote_ip, - (UINT32) inMetaValues->processId, path_len, path, - &irp, &irp_status, &info); + if (!NT_SUCCESS(fort_buffer_blocked_write( + &g_device->buffer, remote_ip, + (UINT32) inMetaValues->processId, path_len, path, + &irp, &irp_status, &info))) { + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, + "FORT: Classify v4: Log buffer underflow: %d\n", + FORT_LOG_BLOCKED_SIZE(path_len)); + } if (irp != NULL) { fort_request_complete_info(irp, irp_status, info);