lwf with ipv6

Hi, guys
My knowledge of the NDIS is rather modest so please bear with me.
I am working on a somewhat modified lwf sample from the WDK. After assigning an IPv6 address to one of the network cards (via Windows 7 GUI, LAN settings) the IPv6 address is not saved and sometimes reboot is required, which is ok since my driver is a mandatory filter. The FilterAttach callback is called 4 times with

BaseMiniportInstanceName =

Intel(R) PRO/1000 MT Network Connection
WAN Miniport (IPv6)
WAN Miniport (IP)
WAN Miniport (Network Monitor)

and the filter attaches itself to all those devices.
I have tried to debug and log every possible request going through the driver but some questions are still unresolved…

  1. How can i monitor this “IPv6 binding” in my driver to understand why it fails?
  2. How can I monitor the IPv6 packets?
  3. Should (and does) the filter respond somehow to add/remove of a protocol from a network stack? I tried to remove IPv4 and IPv6 and nothing happens in the driver…

Any help would be appreciated…
Dmitry.

When the Network Adapter Properties GUI says "A reboot is required … ", that means that something failed when it told NDIS to adjust the bindings (e.g., a filter driver failed a FilterRestart operation). Generally, you should treat it as a bug if the installation of your filter/protocol causes this dialog to pop up. First thing to check is that FilterAttach, FilterRestart, FilterPause, and FilterDetach all complete successfully without returning an error code, on each of your 4 filter instances (1 Intel miniport, and the 3 WAN miniports).

It sounds like you’re getting some of the inbox drivers mixed up. The “WAN Miniport (IPv6)” is not actually responsible for implementing IPv6; IPv6 is implemented by the TCPIP6 protocol driver. If there’s a problem with IPv6, then you need to look at what the TCPIP6 driver is doing. “WAN Miniport (IPv6)” is just a tunnel miniport that can receive tunneled IPv6 packets. If you’re not specifically dealing with tunneled IPv6, then you can ignore the tunnel miniports, since they won’t be used.

Typically all traffic will be received on the “Intel(R) PRO/1000 MT Network Connection” miniport. After that, it will go to your filter, and then up to the appropriate protocol (TCPIP6 for IPv6, and TCPIP for IPv4).

  1. As discussed above, there’s not really a special “IPv6 binding”; the binding on the Intel miniport will carry all packets, including IPv6 traffic.
  2. To monitor IPv6 packets, parse the packet headers of all traffic. Or better yet, use a WFP callout, so you don’t have to parse any headers, and you can tell Windows to do the parsing for you.
  3. Yes, the filter will be Paused and Restarted when a protocol is added/removed. If you’re seeing nothing happening, then perhaps your filter is already Paused. This will happen if you failed to Restart earlier.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Monday, July 11, 2011 7:22 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] lwf with ipv6

Hi, guys
My knowledge of the NDIS is rather modest so please bear with me.
I am working on a somewhat modified lwf sample from the WDK. After assigning an IPv6 address to one of the network cards (via Windows 7 GUI, LAN settings) the IPv6 address is not saved and sometimes reboot is required, which is ok since my driver is a mandatory filter. The FilterAttach callback is called 4 times with

BaseMiniportInstanceName =

Intel(R) PRO/1000 MT Network Connection
WAN Miniport (IPv6)
WAN Miniport (IP)
WAN Miniport (Network Monitor)

and the filter attaches itself to all those devices.
I have tried to debug and log every possible request going through the driver but some questions are still unresolved…

  1. How can i monitor this “IPv6 binding” in my driver to understand why it fails?
  2. How can I monitor the IPv6 packets?
  3. Should (and does) the filter respond somehow to add/remove of a protocol from a network stack? I tried to remove IPv4 and IPv6 and nothing happens in the driver…

Any help would be appreciated…
Dmitry.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Jeffrey, thanks a lot for your quick and informative answer.

Dmitry.

After investigating this issue, I’ve run into the value [DisabledComponents] under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\

and noticed it is 0xff which is “All IPv6 functionality is disabled”. The value was present on the machine with our client installed, while a clean machine did not have this value at all. After deleting (or zeroing the value), all IPv6 functionality came back and now the Miniport is configurable with IPv6 address…