Skip to content

Commit

Permalink
Consider whether Dot11PacketFilter changed when removing an open inst…
Browse files Browse the repository at this point in the history
…ance
  • Loading branch information
bonsaiviking committed Feb 2, 2021
1 parent 10d4de9 commit 2fed31c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packetWin7/npf/npf/Openclos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,7 @@ NPF_RemoveFromGroupOpenArray(
pFiltMod->MyPacketFilter = 0;
#ifdef HAVE_DOT11_SUPPORT
// Reset the raw wifi filter in case this was the last instance
OldPacketFilter |= pFiltMod->Dot11PacketFilter;
pFiltMod->Dot11PacketFilter = 0;
#endif

Expand Down Expand Up @@ -1647,7 +1648,11 @@ NPF_RemoveFromGroupOpenArray(
NdisReleaseRWLock(pFiltMod->OpenInstancesLock, &lockState);

/* If the packet filter has changed, originate an OID Request to set it to the new value */
if (pFiltMod->MyPacketFilter != OldPacketFilter)
if ((pFiltMod->MyPacketFilter
#ifdef HAVE_DOT11_SUPPORT
| pFiltMod->Dot11PacketFilter
#endif
) != OldPacketFilter)
{
pBuffer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ULONG), NPF_INTERNAL_OID_TAG);
if (pBuffer == NULL)
Expand Down

0 comments on commit 2fed31c

Please sign in to comment.