diff --git a/doc/windivert.html b/doc/windivert.html index beec541..27ee7b2 100644 --- a/doc/windivert.html +++ b/doc/windivert.html @@ -431,16 +431,6 @@ WinDivert filter language. -WINDIVERT_FLAG_PASSTHRU - - -This flag creates a WinDivert handle in "passthru" mode that does not divert -packets. -Such handle can still be used for packet injection. - - - - WINDIVERT_FLAG_NO_CHECKSUM diff --git a/include/windivert.h b/include/windivert.h index ff9c93c..d83516a 100644 --- a/include/windivert.h +++ b/include/windivert.h @@ -79,7 +79,6 @@ typedef enum */ #define WINDIVERT_FLAG_SNIFF 1 #define WINDIVERT_FLAG_DROP 2 -#define WINDIVERT_FLAG_PASSTHRU 4 #define WINDIVERT_FLAG_NO_CHECKSUM 1024 /* diff --git a/sys/windivert.c b/sys/windivert.c index 8abcdcf..fe661a3 100644 --- a/sys/windivert.c +++ b/sys/windivert.c @@ -1615,16 +1615,8 @@ extern VOID windivert_ioctl(IN WDFQUEUE queue, IN WDFREQUEST request, goto windivert_ioctl_exit; } - if ((context->flags & WINDIVERT_FLAG_PASSTHRU) != 0) - { - // Passthru mode. - is_inbound = is_outbound = is_ipv4 = is_ipv6 = FALSE; - } - else - { - windivert_filter_analyze(context->filter, &is_inbound, - &is_outbound, &is_ipv4, &is_ipv6); - } + windivert_filter_analyze(context->filter, &is_inbound, + &is_outbound, &is_ipv4, &is_ipv6); status = windivert_register_callouts(context, is_inbound, is_outbound, is_ipv4, is_ipv6); @@ -1935,8 +1927,7 @@ static void windivert_classify_callout(IN UINT8 direction, IN UINT32 if_idx, packet_state = FwpsQueryPacketInjectionState0(injectv6_handle, buffers, &packet_context); } - if (!windivert_context_verify(context, WINDIVERT_CONTEXT_STATE_OPEN) || - (context->flags & WINDIVERT_FLAG_PASSTHRU) != 0) + if (!windivert_context_verify(context, WINDIVERT_CONTEXT_STATE_OPEN)) { result->actionType = FWP_ACTION_PERMIT; return;