Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
gre(4) socket layer MP safe
To:
tech@openbsd.org
Date:
Sat, 13 Jul 2024 11:54:26 +0200

Download raw body.

Thread
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?

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,