From 3bc69ad9b3eeeac418d2268150f14b7c482ce159 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Thu, 11 Jun 2020 12:25:49 +0000 Subject: [PATCH] Make linux(4) handle SO_REUSEPORT. Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25216 --- sys/compat/linux/linux_socket.c | 2 ++ sys/compat/linux/linux_socket.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 8f1ab8f9f8f..733e4b676c1 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -223,6 +223,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); + case LINUX_SO_REUSEPORT: + return (SO_REUSEPORT_LB); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h index 8764becb8e6..50fe7348490 100644 --- a/sys/compat/linux/linux_socket.h +++ b/sys/compat/linux/linux_socket.h @@ -190,6 +190,7 @@ int linux_accept(struct thread *td, struct linux_accept_args *args); #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_REUSEPORT 15 #ifndef LINUX_SO_PASSCRED /* powerpc differs */ #define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17