mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:55:54 +00:00
Driver: Minor refactor
This commit is contained in:
parent
73c7ecc2f6
commit
f5ef18d6a4
@ -431,8 +431,8 @@ static void fort_callout_stream_classify(const FWPS_INCOMING_VALUES0 *inFixedVal
|
||||
fort_callout_flow_classify(inMetaValues, flowContext, classifyOut, dataSize, isIPv6,
|
||||
/*is_tcp=*/TRUE, inbound);
|
||||
|
||||
/* Flush flow's deferred TCP packets on FIN */
|
||||
#if 0
|
||||
/* Flush flow's deferred TCP packets on FIN */
|
||||
if (streamFlags & (FWPS_STREAM_FLAG_RECEIVE_DISCONNECT | FWPS_STREAM_FLAG_SEND_DISCONNECT)) {
|
||||
PFORT_FLOW flow = (PFORT_FLOW) flowContext;
|
||||
|
||||
|
@ -425,11 +425,10 @@ static void fort_flow_speed_limit(PFORT_STAT stat, PFORT_FLOW flow, const FORT_F
|
||||
/* Add traffic to app. group */
|
||||
*group_bytes += data_len;
|
||||
|
||||
const BOOL defer_flow = (*group_bytes >= limit_bytes);
|
||||
|
||||
/* Defer ACK */
|
||||
{
|
||||
const UCHAR defer_flag = inbound ? FORT_FLOW_DEFER_OUT : FORT_FLOW_DEFER_IN;
|
||||
const BOOL defer_flow = (*group_bytes >= limit_bytes);
|
||||
|
||||
fort_flow_flags_set(flow, defer_flag, defer_flow);
|
||||
}
|
||||
@ -560,12 +559,12 @@ FORT_API UINT32 fort_stat_dpc_group_flush(PFORT_STAT stat)
|
||||
traf = group->traf;
|
||||
|
||||
// Inbound
|
||||
fort_stat_group_flush_limit_bytes(
|
||||
&defer_flush_bits, &flush_bit, &traf.in_bytes, group_limit->in_bytes, i, 1, 1);
|
||||
fort_stat_group_flush_limit_bytes(&defer_flush_bits, &flush_bit, &traf.in_bytes,
|
||||
group_limit->in_bytes, /*group_index=*/i, /*flush_index=*/1, /*defer_offset=*/1);
|
||||
|
||||
// Outbound
|
||||
fort_stat_group_flush_limit_bytes(
|
||||
&defer_flush_bits, &flush_bit, &traf.out_bytes, group_limit->out_bytes, i, 2, 0);
|
||||
fort_stat_group_flush_limit_bytes(&defer_flush_bits, &flush_bit, &traf.out_bytes,
|
||||
group_limit->out_bytes, /*group_index=*/i, /*flush_index=*/2, /*defer_offset=*/0);
|
||||
|
||||
// Adjust flushed bytes
|
||||
group->traf = traf;
|
||||
|
Loading…
Reference in New Issue
Block a user