All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <kernel@kyup.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ebiederm@xmission.com
Subject: [PATCH 1/4] inetpeer: Add net namespace assosication in inet_peer_base
Date: Wed, 17 Feb 2016 12:09:55 +0200	[thread overview]
Message-ID: <1455703798-15258-2-git-send-email-kernel@kyup.com> (raw)
In-Reply-To: <1455703798-15258-1-git-send-email-kernel@kyup.com>

This is required so that the inet_peer_* sysctls can be
namespacified

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
---
 include/net/inetpeer.h | 1 +
 net/ipv4/route.c       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 235c7811a86a..287bb54cda58 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -67,6 +67,7 @@ struct inet_peer_base {
 	struct inet_peer __rcu	*root;
 	seqlock_t		lock;
 	int			total;
+	struct net		*net;
 };
 
 void inet_peer_base_init(struct inet_peer_base *);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 85f184e429c6..4bb45e52411c 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2775,6 +2775,7 @@ static int __net_init ipv4_inetpeer_init(struct net *net)
 		return -ENOMEM;
 	inet_peer_base_init(bp);
 	net->ipv4.peers = bp;
+	bp->net = net;
 	return 0;
 }
 
-- 
2.5.0

  reply	other threads:[~2016-02-17 10:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 10:09 [PATCH 0/4] Namespacify inet_peer_* sysctl knobs Nikolay Borisov
2016-02-17 10:09 ` Nikolay Borisov [this message]
2016-02-17 10:09 ` [PATCH 2/4] inetpeer: Namespacify inet_peer_maxttl sysctl knob Nikolay Borisov
2016-02-17 10:09 ` [PATCH 3/4] inetpeer: Namespacify inet_peer_minttl " Nikolay Borisov
2016-02-17 10:09 ` [PATCH 4/4] inetpeer: Namespacify inet_peer_threshold " Nikolay Borisov
2016-02-17 19:15 ` [PATCH 0/4] Namespacify inet_peer_* sysctl knobs Eric W. Biederman
2016-02-18 15:04   ` Nikolay Borisov

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=1455703798-15258-2-git-send-email-kernel@kyup.com \
    --to=kernel@kyup.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --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 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.