Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Mar 2002 16:21:43 -0800 (PST)
From:      Emmanuel Duros <eduros@udcast.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/36184: select() always returns available for writing on SOCK_RAW socket (E.g. Divert)
Message-ID:  <200203220021.g2M0LhR46640@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         36184
>Category:       kern
>Synopsis:       select() always returns available for writing on SOCK_RAW socket (E.g. Divert)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 21 16:30:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Emmanuel Duros
>Release:        FreeBSD 4.4R
>Organization:
UDcast
>Environment:
FreeBSD box132 4.4-RELEASE FreeBSD 4.4-RELEASE #10: Thu Mar  7 18:08:57 GMT 2002
>Description:
the select() fonction seems to always return "write available" when writing to a SOCK_RAW socket. 
I am writing an application similar to natd using the DIVERT mechanism. I extract packets from the kernel and reinject them into the stack.

When the IP stack is full (eg with a bdwth limited with dumynet), the select() indicates I can still write in the socket whereas sendto() returns no buffer space available.

This pb appears with natd which starts using much cpu when the IP stack is full. For more details see: http://www.freebsd.org/cgi/query-pr.cgi?pr=36183

Is there a workaround to that ? How can we be informed that the socket is ready for writing without using an active pooling ?

Thanks...

>How-To-Repeat:
     
>Fix:
     
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203220021.g2M0LhR46640>