Revert "Driver: Ignore loopback traffic."

This reverts commit ff6ab09908.
Not needed now, because we use flow-contexts.
This commit is contained in:
Nodir Temirkhodjaev 2018-01-14 08:51:09 +05:00
parent 1d7f107398
commit 1f19d69652

View File

@ -377,23 +377,15 @@ fort_callout_stream_classify_v4 (const FWPS_INCOMING_VALUES0 *inFixedValues,
UINT64 flowContext, UINT64 flowContext,
FWPS_CLASSIFY_OUT0 *classifyOut) FWPS_CLASSIFY_OUT0 *classifyOut)
{ {
const UINT32 flags = inFixedValues->incomingValue[ const FWPS_STREAM_DATA0 *streamData = packet->streamData;
FWPS_FIELD_STREAM_V4_FLAGS].value.uint32; const UINT32 dataSize = (UINT32) streamData->dataLength;
FWPS_STREAM_DATA0 *streamData;
UINT32 dataSize;
BOOL inbound;
const BOOL inbound = (streamData->flags & FWPS_STREAM_FLAG_RECEIVE) != 0;
UNUSED(inFixedValues);
UNUSED(filter); UNUSED(filter);
UNUSED(flowContext); UNUSED(flowContext);
if (flags & FWP_CONDITION_FLAG_IS_LOOPBACK)
return;
streamData = packet->streamData;
dataSize = (UINT32) streamData->dataLength;
inbound = (streamData->flags & FWPS_STREAM_FLAG_RECEIVE) != 0;
fort_callout_flow_classify_v4(inMetaValues, classifyOut, dataSize, inbound); fort_callout_flow_classify_v4(inMetaValues, classifyOut, dataSize, inbound);
} }
@ -405,26 +397,17 @@ fort_callout_datagram_classify_v4 (const FWPS_INCOMING_VALUES0 *inFixedValues,
UINT64 flowContext, UINT64 flowContext,
FWPS_CLASSIFY_OUT0 *classifyOut) FWPS_CLASSIFY_OUT0 *classifyOut)
{ {
const UINT32 flags = inFixedValues->incomingValue[ const PNET_BUFFER netBuf = NET_BUFFER_LIST_FIRST_NB(netBufList);
FWPS_FIELD_DATAGRAM_DATA_V4_FLAGS].value.uint32; const UINT32 dataSize = NET_BUFFER_DATA_LENGTH(netBuf);
PNET_BUFFER netBuf;
UINT32 dataSize;
FWP_DIRECTION direction;
BOOL inbound;
const FWP_DIRECTION direction = (FWP_DIRECTION) inFixedValues->incomingValue[
FWPS_FIELD_DATAGRAM_DATA_V4_DIRECTION].value.uint8;
const BOOL inbound = (direction == FWP_DIRECTION_INBOUND);
UNUSED(inFixedValues);
UNUSED(filter); UNUSED(filter);
UNUSED(flowContext); UNUSED(flowContext);
if (flags & FWP_CONDITION_FLAG_IS_LOOPBACK)
return;
netBuf = NET_BUFFER_LIST_FIRST_NB(netBufList);
dataSize = NET_BUFFER_DATA_LENGTH(netBuf);
direction = (FWP_DIRECTION) inFixedValues->incomingValue[
FWPS_FIELD_DATAGRAM_DATA_V4_DIRECTION].value.uint8;
inbound = (direction == FWP_DIRECTION_INBOUND);
fort_callout_flow_classify_v4(inMetaValues, classifyOut, dataSize, inbound); fort_callout_flow_classify_v4(inMetaValues, classifyOut, dataSize, inbound);
} }