Skip to content

Commit

Permalink
Inject inbound NBLs to the receive stack, not send stack. See nmap/nm…
Browse files Browse the repository at this point in the history
…ap#1529
  • Loading branch information
bonsaiviking committed Aug 6, 2019
1 parent b009a6c commit 5d46f41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packetWin7/npf/npf/Loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ NPF_NetworkClassify(
compartmentID = (COMPARTMENT_ID)inMetaValues->compartmentId;

// This cloned NBL will be freed in NPF_NetworkInjectionComplete function.
#if 0 // Should we send inbound packets to the receive stack? Seems like we should, but it works for now.
if (bInbound) {
// Inbound packets that we didn't inject should be sent to receive stack.
if (bInbound && !bSelfSent) {
status = FwpsInjectNetworkReceiveAsync(bInnerIPv4 ? g_InjectionHandle_IPv4 : g_InjectionHandle_IPv6,
NULL,
0,
Expand All @@ -616,8 +616,8 @@ NPF_NetworkClassify(
NPF_NetworkInjectionComplete,
NULL);
}
// Outbound packets and ones we injected should be sent to the send stack.
else
#endif // 0
{
status = FwpsInjectNetworkSendAsync(bInnerIPv4 ? g_InjectionHandle_IPv4 : g_InjectionHandle_IPv6,
NULL,
Expand Down

0 comments on commit 5d46f41

Please sign in to comment.