Index | Thread | Search

From:
Vitaliy Makkoveev <otto@bsdbox.dev>
Subject:
Re: gre(4) socket layer MP safe
To:
Alexander Bluhm <bluhm@openbsd.org>
Cc:
tech@openbsd.org
Date:
Sat, 13 Jul 2024 14:27:41 +0300

Download raw body.

Thread
> On 13 Jul 2024, at 12:54, Alexander Bluhm <bluhm@openbsd.org> wrote:
> 
> Hi,
> 
> gre_send() looks MP safe.  The pipex code matches more or less what
> udp_send() does.  rip_send() is already called with PR_MPSOCKET.
> 
> ok?
> 

pipex is MP safe for a long time. ok mvs

> bluhm
> 
> Index: netinet/in_proto.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/in_proto.c,v
> diff -u -p -r1.105 in_proto.c
> --- netinet/in_proto.c	12 Jul 2024 19:50:35 -0000	1.105
> +++ netinet/in_proto.c	12 Jul 2024 20:00:16 -0000
> @@ -318,7 +318,7 @@ const struct protosw inetsw[] = {
>   .pr_type	= SOCK_RAW,
>   .pr_domain	= &inetdomain,
>   .pr_protocol	= IPPROTO_GRE,
> -  .pr_flags	= PR_ATOMIC|PR_ADDR,
> +  .pr_flags	= PR_ATOMIC|PR_ADDR|PR_MPSOCKET,
>   .pr_input	= gre_input,
>   .pr_ctloutput	= rip_ctloutput,
>   .pr_usrreqs	= &gre_usrreqs,
>