diff mbox

[5/5] net: pppoe,pppol2tp - register channels with explicit net

Message ID 4975dc14.0637560a.7f8e.729c@mx.google.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Cyrill Gorcunov Jan. 1, 1970, midnight UTC
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(-)

Comments

James Chapman Jan. 20, 2009, 9:56 p.m. UTC | #1
Cyrill Gorcunov wrote:
> 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>

This one's ok by me too for pppol2tp.

Signed-off-by: James Chapman <jchapman@katalix.com>

> ---
>  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;
>  
>
Cyrill Gorcunov Jan. 20, 2009, 9:58 p.m. UTC | #2
[James Chapman - Tue, Jan 20, 2009 at 09:56:32PM +0000]
| Cyrill Gorcunov wrote:
| > 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>
| 
| This one's ok by me too for pppol2tp.
| 
| Signed-off-by: James Chapman <jchapman@katalix.com>
| 

...

| 
| 
| -- 
| James Chapman
| Katalix Systems Ltd
| http://www.katalix.com
| Catalysts for your Embedded Linux software development
| 

Thanks a lot for testing, James! I really appreciate!

		- Cyrill -
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Divy Le Ray Jan. 21, 2009, 12:09 a.m. UTC | #3
Cyrill Gorcunov wrote:
> In PPPo[E|L2TP] we could explicitly point which net namespace
> we're going to use for channels - make it so.
>
>   

Hi Cyrill,

For some reason, I see your your mail' date pointing to 12/31/1969.

Cheers,
Divy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Jan. 21, 2009, 12:17 a.m. UTC | #4
From: Divy Le Ray <divy@chelsio.com>
Date: Tue, 20 Jan 2009 16:09:00 -0800

> For some reason, I see your your mail' date pointing to 12/31/1969.

Yes, he knows.  It's a quilt hiccup.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;