Current Internet Connection dropped out after installing NDIS Filter driver.

HI,

I have developed simple ndis filter driver. I have installed ndis filter driver manually by going to network connection adding it as Service. After Installation filter driver is working as expected. But Internet Connection[LAN/WIFI] which is connected during installation getting disconnected. Only way turn back to connection is either unplug LAN and connect it back or turn off wifi and turn on it back.

I am not sure whether this issue is from driver side?

Please provide any help or pointer in resolving these issue.

Thanks,
RAM

Try changing your filter to be an “optional” filter. This is a line in your INF:

; For a Mandatory filter, use this:
HKR, Ndi,FilterRunType,0x00010001, 1 ; Mandatory filter

; For an Optional filter, use this:
HKR, Ndi,FilterRunType,0x00010001, 2 ; Optional filter

Because a “mandatory” filter typically enforces security policy or ensures functional correctness, NDIS deliberately disconnects and reconnects the network, so that the new filter has a chance to filter the connection getting started from scratch.

Other thing to check is to make sure your filter is actually running: “net start yourfilter”.

@ Jefrfrey Tipet , thanks for the input.

Internet Connectivity lost,issue is not happening in fresh windows 7 system. Issue happens only when in corporate network where firewall has been established. for ex in system where issue happens “McAfee NDIS Light-Weight Filter” is installed.
Internet connectivity also lost during uninstallation method.

And also the same issue reproducible sometime using sample provided in msdn NDIS Sample LightWeight Filter[https://code.msdn.microsoft.com/windowshardware/NDISLWFSYS-Sample-NDIS-60-42b76875].

INF:

;-------------------------------------------------------------------------
; Ndi installation support
;-------------------------------------------------------------------------
[Inst_Ndi]
HKR, Ndi,Service,“ndisrd”
HKR, Ndi,CoServices,0x00010000,“ndisrd”
HKR, Ndi,HelpText,%ndisrfl_HelpText%
HKR, Ndi,FilterClass, compression
HKR, Ndi,FilterType,0x00010001,0x00000002
HKR, Ndi\Interfaces,UpperRange,“noupper”
HKR, Ndi\Interfaces,LowerRange,“nolower”
HKR, Ndi\Interfaces, FilterMediaTypes,“ethernet,wan,tunnel,ppip”
HKR, Ndi,FilterRunType, 0x00010001, 1 ;this filter must run before any protocol can bind to the below miniport

;-------------------------------------------------------------------------
; Service installation support
;-------------------------------------------------------------------------
[Install.Services]
AddService=ndisrd,ndisrd_Service_Inst

[ndisrd_Service_Inst]
DisplayName = %ndisrfl_Desc%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 1 ;SERVICE_SYSTEM_START
ErrorControl = 1 ;SERVICE_DEMAND_START
ServiceBinary = %12%\ndisrfl.sys
LoadOrderGroup = NDIS
Description = %ndisrfl_Desc%

Hi,

on using NDIS Sample LightWeight Filter driver provided on msdn also issue reproduced. On Installing Ndis lwf using netcfg tool, internet connectivity is lost :frowning: .
I have taken log on that time using dbgview. Log didn’t report any failure . Log Shared @ http://pastebin.com/0k1yDM7S.

Have examined function like filter attach. ndis FilterAttach are completing successfully.

I am very new to ndis filter driver. Any pointer or suggestion will be much helpful.

Note: This issue is not reproducible in fresh windows 7 test system. Issue is getting only reproduced in corporate desktop machine in which many security related software will be installed.