Subject: Re: Missing EOF for socketpair() with SOCK_DGRAM
To: Martin Husemann <martin@duskware.de>
From: Matt Thomas <matt@3am-software.com>
List: tech-net
Date: 11/01/2006 09:51:10
On Nov 1, 2006, at 12:55 AM, Martin Husemann wrote:

> On Wed, Nov 01, 2006 at 06:22:54AM +0100, Christian Biere wrote:
>> --- uipc_usrreq.c	3 Sep 2006 21:15:29 -0000	1.93
>> +++ uipc_usrreq.c	1 Nov 2006 04:14:26 -0000
>> @@ -799,7 +800,7 @@ unp_disconnect(struct unpcb *unp)
>>  			unp2->unp_nextref = unp->unp_nextref;
>>  		}
>>  		unp->unp_nextref = 0;
>> -		unp->unp_socket->so_state &= ~SS_ISCONNECTED;
>> +		soisdisconnected(unp->unp_socket);
>>  		break;
>>
>>  	case SOCK_STREAM:
>
> This change looks correct to me.
>
> Btw: there is a similar issue in netinet/udp_usrreq.c -  
> conveniently marked
> /* XXX */ already. Same for netinet6/raw_ip6.c and upd6_usrreq.c.

Actually, UDP doesn't have this problem.  AF_LOCAL/socketpair have  
this problem
because they are a pair intimately known only to each other.  That  
isn't true
for UDP.