Dummynet on Win7: can intercept IPv4 but not IPv6

I have installed Dummynet on a 32 bit Win7 machine and started both IPv4 ping and IPv6 ping to remote addresses that are reached by the same NIC.

I then do:

[font=Courier]ipfw -q flush
ipfw -q pipe flush[/font]

[font=Courier]ipfw add deny proto ip [/font]
→ This stops IPv4 pings as expected, but IPv6 pings continue.

[font=Courier]ipfw -q flush[/font]
[font=Courier]ipfw add deny proto ip6 [/font]
→ Still IPv6 pings continue

Any idea why the commands have no effect on IPv6 traffic?

Not sure - you may need to ping Luigi Rizzo and see if the Windows port supports IP v6 - http://info.iet.unipi.it/~luigi/dummynet/

Thanks Patrick,

I contacted Luigi - he checked the code and found that it only intercept packets with an ethernet type of 0x0800 (IPv4). He suggested a 1 line change to also intercept type 0x86dd (IPv6).

I’m now having trouble building from source. I’m not so familiar with makefiles so I hope someone can guide me :slight_smile:

I followed the build instructions in the Readme (installing cygwin and Windows Driver Kit Version 7.1.0) and then did a make but got the following error:

[size=small][font=Courier]make[1]: Entering directory ‘/cygdrive/c/Work/20130607-ipfw3/ipfw3-2012/kipfw-mod’
make[1]: Leaving directory ‘/cygdrive/c/Work/20130607-ipfw3/ipfw3-2012/kipfw-mod’
make ndis-glue
make[1]: Entering directory ‘/cygdrive/c/Work/20130607-ipfw3/ipfw3-2012’
cp C:/WinDDK/7600.16385.1/src/network/ndis/passthru/driver/*.[ch] kipfw-mod
cat kipfw/win-passthru.diff | sed “s/$(printf ‘\r’)//g” | (cd kipfw-mod; patch )
patching file miniport.c
Hunk #1 FAILED at 223 (different line endings).
Hunk #2 FAILED at 347 (different line endings).
2 out of 2 hunks FAILED – saving rejects to file miniport.c.rej
patching file passthru.c
Hunk #1 FAILED at 47 (different line endings).
Hunk #2 FAILED at 136 (different line endings).
Hunk #3 FAILED at 165 (different line endings).
Hunk #4 FAILED at 205 (different line endings).
Hunk #5 FAILED at 276 (different line endings).
Hunk #6 FAILED at 453 (different line endings).
6 out of 6 hunks FAILED – saving rejects to file passthru.c.rej
patching file passthru.h
Hunk #1 FAILED at 61 (different line endings).
Hunk #2 FAILED at 366 (different line endings).
Hunk #3 FAILED at 376 (different line endings).
Hunk #4 FAILED at 475 (different line endings).
4 out of 4 hunks FAILED – saving rejects to file passthru.h.rej
patching file protocol.c
Hunk #1 FAILED at 841 (different line endings).
Hunk #2 FAILED at 1021 (different line endings).
Hunk #3 FAILED at 1055 (different line endings).
Hunk #4 FAILED at 1120 (different line endings).
Hunk #5 FAILED at 1199 (different line endings).
Hunk #6 FAILED at 1247 (different line endings).
6 out of 6 hunks FAILED – saving rejects to file protocol.c.rej
Makefile:77: recipe for target ‘ndis-glue’ failed
make[1]: *** [ndis-glue] Error 1
make[1]: Leaving directory ‘/cygdrive/c/Work/20130607-ipfw3/ipfw3-2012’
Makefile:82: recipe for target ‘kipfw-src’ failed
make: *** [kipfw-src] Error 2
[/font][/size]

Luigi helped with the compile. The latest code from here works:

A few other things I had to do:

  • Run Cygwin terminal as administrator (just running shell within DOS window causes problems with some commands e.g. “find” being sent to DOS)
  • Set permissions on all files: find * -exec chmod 755 {} ;
  • Manually copy cygwin1.dll, cyggcc_s-1.dll from the cygwin folder into the Dummynet binary folder.