netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [patch 7/9][NETNS][IPV6] make mld_max_msf readonly in other namespaces
Date: Fri, 04 Jan 2008 12:12:33 +0100	[thread overview]
Message-ID: <20080104111444.687589192@localhost.localdomain> (raw)
In-Reply-To: 20080104111226.776105484@localhost.localdomain

[-- Attachment #1: make-mld_max_msf-readonly.patch --]
[-- Type: text/plain, Size: 1114 bytes --]

The mld_max_msf protects the system with a maximum allowed multicast 
source filters. Making this variable per namespace can be potentially
an problem if someone inside a namespace set it to a big value, that
will impact the whole system including other namespaces.

I don't see any benefits to have it per namespace for now, so in order 
to keep a directory entry in a newly created namespace, I make it
read-only when we are not in the initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
 net/ipv6/sysctl_net_ipv6.c |    3 +++
 1 file changed, 3 insertions(+)

Index: net-2.6.25/net/ipv6/sysctl_net_ipv6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/sysctl_net_ipv6.c
+++ net-2.6.25/net/ipv6/sysctl_net_ipv6.c
@@ -122,6 +122,9 @@ static int ipv6_sysctl_net_init(struct n
     	ipv6_table[5].data = &net->ipv6.sysctl.frags.timeout;
   	ipv6_table[6].data = &net->ipv6.sysctl.frags.secret_interval;
 
+	if (net != &init_net)
+		ipv6_table[7].mode = 0444;
+
 	ipv6_frag_sysctl_init(net);
 
 	net->ipv6.sysctl.bindv6only = 0;

-- 

  parent reply	other threads:[~2008-01-04 11:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04 11:12 [patch 0/9][NETNS][IPV6] make sysctl per namespace Daniel Lezcano
2008-01-04 11:12 ` [patch 1/9][NETNS][IPV6] make ipv6_sysctl_register to return a value Daniel Lezcano
2008-01-04 11:12 ` [patch 2/9][NETNS][IPV6] make the ipv6 sysctl to be a netns subsystem Daniel Lezcano
2008-01-04 11:12 ` [patch 3/9][NETNS][IPV6] make ipv6 structure for netns Daniel Lezcano
2008-01-04 11:12 ` [patch 4/9][NETNS][IPV6] make multiple instance of sysctl tables Daniel Lezcano
2008-01-04 11:12 ` [patch 5/9][NETNS][IPV6] make bindv6only sysctl per namespace Daniel Lezcano
2008-01-07 16:32   ` Benjamin Thery
2008-01-07 16:36     ` Daniel Lezcano
2008-01-07 16:49       ` Eric Dumazet
2008-01-09  8:25       ` David Miller
2008-01-04 11:12 ` [patch 6/9][NETNS][IPV6] make ip6_frags " Daniel Lezcano
2008-01-04 11:12 ` Daniel Lezcano [this message]
2008-01-04 11:12 ` [patch 8/9][NETNS][IPV6] make sysctls route " Daniel Lezcano
2008-01-04 11:12 ` [patch 9/9][NETNS][IPV6] make icmpv6_time sysctl " Daniel Lezcano

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=20080104111444.687589192@localhost.localdomain \
    --to=dlezcano@fr.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).