linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: davem@davemloft.net, jchapman@katalix.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	devel@openvz.org, xemul@openvz.org
Cc: Michal Ostrowski <mostrows@earthlink.net>,
	Cyrill Gorcunov <gorcunov@openvz.org>
Subject: [PATCH 5/5] net: pppoe,pppol2tp - register channels with explicit net
Date: Thu, 01 Jan 1970 03:00:05 +0300	[thread overview]
Message-ID: <4975dc14.0637560a.7f8e.729c@mx.google.com> (raw)
In-Reply-To: 20090120140510.228815074@gmail.com

[-- Attachment #1: net-ppp-register-net-channel --]
[-- Type: text/plain, Size: 1305 bytes --]

In PPPo[E|L2TP] we could explicitly point which net namespace
we're going to use for channels - make it so.

CC: James Chapman <jchapman@katalix.com>
CC: Michal Ostrowski <mostrows@earthlink.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 drivers/net/pppoe.c    |    2 +-
 drivers/net/pppol2tp.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.git/drivers/net/pppoe.c
===================================================================
--- linux-2.6.git.orig/drivers/net/pppoe.c
+++ linux-2.6.git/drivers/net/pppoe.c
@@ -695,7 +695,7 @@ static int pppoe_connect(struct socket *
 		po->chan.private = sk;
 		po->chan.ops = &pppoe_chan_ops;
 
-		error = ppp_register_channel(&po->chan);
+		error = ppp_register_net_channel(dev_net(dev), &po->chan);
 		if (error)
 			goto err_put;
 
Index: linux-2.6.git/drivers/net/pppol2tp.c
===================================================================
--- linux-2.6.git.orig/drivers/net/pppol2tp.c
+++ linux-2.6.git/drivers/net/pppol2tp.c
@@ -1749,7 +1749,7 @@ static int pppol2tp_connect(struct socke
 	po->chan.ops	 = &pppol2tp_chan_ops;
 	po->chan.mtu	 = session->mtu;
 
-	error = ppp_register_channel(&po->chan);
+	error = ppp_register_net_channel(sock_net(sk), &po->chan);
 	if (error)
 		goto end_put_tun;
 

-- 

  parent reply	other threads:[~2009-01-20 14:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090120140510.228815074@gmail.com>
1970-01-01  0:00 ` [PATCH 1/5] net: pppoe - code cleanup and helpers Cyrill Gorcunov
1970-01-01  0:00 ` [PATCH 2/5] net: pppoe - introduce net-namespace functionality Cyrill Gorcunov
1970-01-01  0:00 ` [PATCH 3/5] net: pppol2tp " Cyrill Gorcunov
2009-01-20 21:54   ` James Chapman
1970-01-01  0:00 ` [PATCH 4/5] net: ppp_generic - introduce net-namespace functionality v2 Cyrill Gorcunov
1970-01-01  0:00 ` Cyrill Gorcunov [this message]
2009-01-20 21:56   ` [PATCH 5/5] net: pppoe,pppol2tp - register channels with explicit net James Chapman
2009-01-20 21:58     ` Cyrill Gorcunov
2009-01-21  0:09   ` Divy Le Ray
2009-01-21  0:17     ` David Miller

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=4975dc14.0637560a.7f8e.729c@mx.google.com \
    --to=gorcunov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=gorcunov@openvz.org \
    --cc=jchapman@katalix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mostrows@earthlink.net \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.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).