Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2006 18:13:29 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        net@freebsd.org
Cc:        rizzo@icir.org
Subject:   using ipfw seems to interfere with socket communication
Message-ID:  <200606271813.29980.mi%2Bmx@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
After I added the following rules to my ipfw configuration:

	ipfw pipe 1 config bw 2000000000Mbit/s
	ipfw add 200 pipe 1 tcp from any to any

The following test from Tcl's regression-test suite started to fail:

    set s [socket -server accept 0]
    set sock ""
    set s2 [socket 127.0.0.1 [lindex [fconfigure $s -sockname] 2]]
    vwait sock
    puts $s2 "one"
    flush $s2
    after 500
    fconfigure $sock -blocking 0
    set result a:[gets $sock]
    lappend result b:[gets $sock]  
    fconfigure $sock -blocking 1
    puts $s2 "two"
    flush $s2
    fconfigure $sock -blocking 0
    lappend result c:[gets $sock]
    fconfigure $sock -blocking 1
    close $s2
    close $s
    close $sock
    set result

Instead of the expected ``a:one b: c:two'', the result was consistently 
``a:one b: c:''. This means, the gets in the line:

	lappend result c:[gets $sock]

was always returning empty string, instead of the string "two", that was 
written into the socket and flushed.

Is the test wrong, and such result is possible, or is dummynet triggering a 
bug? Unloading the dummynet module allows the test to succeed...

Thanks!

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606271813.29980.mi%2Bmx>