All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	David Ahern <dsahern@gmail.com>,
	Carlo Carraro <colrack@gmail.com>
Subject: [PATCH net-next 6/7] sctp: add sysctl net.sctp.l3mdev_accept
Date: Sun, 13 Nov 2022 11:44:42 -0500	[thread overview]
Message-ID: <bf6bcf15c5b1f921758bc92cae2660f68ed6848b.1668357542.git.lucien.xin@gmail.com> (raw)
In-Reply-To: <cover.1668357542.git.lucien.xin@gmail.com>

This patch is to add sysctl net.sctp.l3mdev_accept to allow
users to change the pernet global l3mdev_accept.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 Documentation/networking/ip-sysctl.rst |  9 +++++++++
 net/sctp/sysctl.c                      | 11 +++++++++++
 2 files changed, 20 insertions(+)

diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst
index 815efc89ad73..096ed1a82cbc 100644
--- a/Documentation/networking/ip-sysctl.rst
+++ b/Documentation/networking/ip-sysctl.rst
@@ -3100,6 +3100,15 @@ ecn_enable - BOOLEAN
 
         Default: 1
 
+l3mdev_accept - BOOLEAN
+	Enabling this option allows a "global" bound socket to work
+	across L3 master domains (e.g., VRFs) with packets capable of
+	being received regardless of the L3 domain in which they
+	originated. Only valid when the kernel was compiled with
+	CONFIG_NET_L3_MASTER_DEV.
+
+	Default: 1 (enabled)
+
 
 ``/proc/sys/net/core/*``
 ========================
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index b46a416787ec..7f40ed117fc7 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -347,6 +347,17 @@ static struct ctl_table sctp_net_table[] = {
 		.extra1		= &max_autoclose_min,
 		.extra2		= &max_autoclose_max,
 	},
+#ifdef CONFIG_NET_L3_MASTER_DEV
+	{
+		.procname	= "l3mdev_accept",
+		.data		= &init_net.sctp.l3mdev_accept,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec_minmax,
+		.extra1		= SYSCTL_ZERO,
+		.extra2		= SYSCTL_ONE,
+	},
+#endif
 	{
 		.procname	= "pf_enable",
 		.data		= &init_net.sctp.pf_enable,
-- 
2.31.1


  parent reply	other threads:[~2022-11-13 16:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13 16:44 [PATCH net-next 0/7] sctp: support vrf processing Xin Long
2022-11-13 16:44 ` [PATCH net-next 1/7] sctp: verify the bind address with the tb_id from l3mdev Xin Long
2022-11-13 16:44 ` [PATCH net-next 2/7] sctp: check ipv6 addr with sk_bound_dev if set Xin Long
2022-11-13 16:44 ` [PATCH net-next 3/7] sctp: check sk_bound_dev_if when matching ep in get_port Xin Long
2022-11-13 16:44 ` [PATCH net-next 4/7] sctp: add skb_sdif in struct sctp_af Xin Long
2022-11-13 16:44 ` [PATCH net-next 5/7] sctp: add dif and sdif check in asoc and ep lookup Xin Long
2022-11-13 20:14   ` kernel test robot
2022-11-15  2:38     ` Xin Long
2022-11-15 10:19       ` Paolo Abeni
2022-11-15 15:25         ` Xin Long
2022-11-13 16:44 ` Xin Long [this message]
2022-11-13 16:44 ` [PATCH net-next 7/7] selftests: add a selftest for sctp vrf Xin Long
2022-11-15 10:29   ` Paolo Abeni
2022-11-15 15:33     ` Xin Long
2022-11-15 18:07       ` Xin Long
2022-11-15 20:40       ` Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf6bcf15c5b1f921758bc92cae2660f68ed6848b.1668357542.git.lucien.xin@gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=colrack@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.