Skip to content

Commit 091ffb3

Browse files
committed
Reformatting
1 parent aff111e commit 091ffb3

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

sys/windivert.c

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ typedef struct flow_s *flow_t;
294294
/*
295295
* Global state.
296296
*/
297-
static HANDLE inject_handle_forward = NULL;
298-
static HANDLE injectv6_handle_forward = NULL;
297+
static HANDLE inject_handle_forward = NULL;
298+
static HANDLE injectv6_handle_forward = NULL;
299299
static HANDLE inject_handle_in = NULL;
300300
static HANDLE inject_handle_out = NULL;
301301
static HANDLE injectv6_handle_in = NULL;
@@ -1059,35 +1059,37 @@ extern NTSTATUS DriverEntry(IN PDRIVER_OBJECT driver_obj,
10591059
&inject_handle_forward);
10601060
if (!NT_SUCCESS(status))
10611061
{
1062-
DEBUG_ERROR("failed to create WFP forward packet injection handle", status);
1062+
DEBUG_ERROR("failed to create WFP forward packet injection handle",
1063+
status);
10631064
goto driver_entry_exit;
10641065
}
10651066
status = FwpsInjectionHandleCreate0(AF_INET6,
10661067
FWPS_INJECTION_TYPE_NETWORK | FWPS_INJECTION_TYPE_FORWARD,
10671068
&injectv6_handle_forward);
10681069
if (!NT_SUCCESS(status))
10691070
{
1070-
DEBUG_ERROR("failed to create WFP ipv6 forward packet injection handle", status);
1071+
DEBUG_ERROR("failed to create WFP ipv6 forward packet injection handle",
1072+
status);
10711073
goto driver_entry_exit;
10721074
}
1073-
10741075
status = FwpsInjectionHandleCreate0(AF_INET,
10751076
FWPS_INJECTION_TYPE_NETWORK | FWPS_INJECTION_TYPE_FORWARD,
10761077
&inject_handle_in);
10771078
if (!NT_SUCCESS(status))
10781079
{
1079-
DEBUG_ERROR("failed to create WFP inbound packet injection handle", status);
1080+
DEBUG_ERROR("failed to create WFP inbound packet injection handle",
1081+
status);
10801082
goto driver_entry_exit;
10811083
}
10821084
status = FwpsInjectionHandleCreate0(AF_INET,
10831085
FWPS_INJECTION_TYPE_NETWORK | FWPS_INJECTION_TYPE_FORWARD,
10841086
&inject_handle_out);
10851087
if (!NT_SUCCESS(status))
10861088
{
1087-
DEBUG_ERROR("failed to create WFP outbound packet injection handle", status);
1089+
DEBUG_ERROR("failed to create WFP outbound packet injection handle",
1090+
status);
10881091
goto driver_entry_exit;
10891092
}
1090-
10911093
status = FwpsInjectionHandleCreate0(AF_INET6,
10921094
FWPS_INJECTION_TYPE_NETWORK | FWPS_INJECTION_TYPE_FORWARD,
10931095
&injectv6_handle_in);
@@ -3758,30 +3760,36 @@ static void windivert_network_classify(context_t context,
37583760
}
37593761
if (ipv4)
37603762
{
3761-
if ( context->layer == WINDIVERT_LAYER_NETWORK_FORWARD ) {
3762-
packet_state = FwpsQueryPacketInjectionState0(inject_handle_forward, buffers,
3763-
&packet_context);
3763+
if (context->layer == WINDIVERT_LAYER_NETWORK_FORWARD)
3764+
{
3765+
packet_state = FwpsQueryPacketInjectionState0(inject_handle_forward,
3766+
buffers, &packet_context);
37643767
}
3765-
else if ( outbound ) {
3766-
packet_state = FwpsQueryPacketInjectionState0(inject_handle_out, buffers,
3767-
&packet_context);
3768+
else if (outbound)
3769+
{
3770+
packet_state = FwpsQueryPacketInjectionState0(inject_handle_out,
3771+
buffers, &packet_context);
37683772
}
3769-
else {
3770-
packet_state = FwpsQueryPacketInjectionState0(inject_handle_in, buffers,
3771-
&packet_context);
3773+
else
3774+
{
3775+
packet_state = FwpsQueryPacketInjectionState0(inject_handle_in,
3776+
buffers, &packet_context);
37723777
}
37733778
}
37743779
else
37753780
{
3776-
if ( context->layer == WINDIVERT_LAYER_NETWORK_FORWARD ) {
3777-
packet_state = FwpsQueryPacketInjectionState0(injectv6_handle_forward, buffers,
3778-
&packet_context);
3781+
if (context->layer == WINDIVERT_LAYER_NETWORK_FORWARD)
3782+
{
3783+
packet_state = FwpsQueryPacketInjectionState0(
3784+
injectv6_handle_forward, buffers, &packet_context);
37793785
}
3780-
else if ( outbound ) {
3786+
else if (outbound)
3787+
{
37813788
packet_state = FwpsQueryPacketInjectionState0(injectv6_handle_out,
37823789
buffers, &packet_context);
37833790
}
3784-
else {
3791+
else
3792+
{
37853793
packet_state = FwpsQueryPacketInjectionState0(injectv6_handle_in,
37863794
buffers, &packet_context);
37873795
}

0 commit comments

Comments
 (0)