On Tue, May 18, 2010 at 01:08:50AM +0900, Yoshihiko Sarumaru wrote: > Hi all, > > Select(2) has three arguments to get socket status for read, write and except. > After upgrading to 8.0-RELEASE, select() after shutdown(SHUT_WR) returns with > the status exceptfds is set. It means out-of-bound data can be read > from the socket, > but recv() with OOB flag returns ECONNRESET, and no packets with urgent flag > was observed by tcpdump. > It seems strange for me, but is it an intentional change on 8.x ? > > This behavior breaks net/stone on 8.0-RELEASE. > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/141103 > The continuous recv() error on PR might lead by incorrectly setted > exceptfds on every recv() > and it should be fixed, but it doesn't matter if above behavior of > select() doesn't occur.
The patch below would fix the problem at hand. I am wondering what unintended consequences it might have. diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index eaefd9c..293dbb1 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -996,7 +996,7 @@ done: static int select_flags[3] = { POLLRDNORM | POLLHUP | POLLERR, POLLWRNORM | POLLHUP | POLLERR, - POLLRDBAND | POLLHUP | POLLERR + POLLRDBAND | POLLERR }; /*
pgprmQLycSGvs.pgp
Description: PGP signature