Subject: Re: accept(2) behaviour.
To: Matt Thomas <matt@3am-software.com>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-net
Date: 06/28/1999 10:48:55
In some email I received from Matt Thomas, sie wrote:
>
> At 06:40 AM 6/27/99 , Darren Reed wrote:
[...]
> >Another interesting `feature' of accept(2) is that in doing a sanity
> >check to ensure that it has been passed an fd which belongs to a
> >connection marked for listen'ing, it makes it impossible for it to
> >return EOPNOTSUPP. In order to correct this, I'd like to add a check
> >for so_type == SOCK_STREAM which would return EOPNOTSUPP as clearly the
> >check described on the man page for accept(2) is not being made.
>
> SOCK_SEQPACKET is also able to do accepts. Anyways, it should be
> up to the xxx_usrreq to determine whether a PRU_LISTEN is allowed
> or not. If you want to catch this before the usrreq routine, the
> correct way to solve this is to add a protosw flag which indicates
> whether listen in allowed.
i.e. declare, publicly what pr_usrreq is capable of handling.
Is this a good thing to be doing ?
Darren