net: pppoe,pppol2tp - register channels with explicit net
authorCyrill Gorcunov <gorcunov@gmail.com>
Wed, 21 Jan 2009 23:55:40 +0000 (15:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jan 2009 23:55:40 +0000 (15:55 -0800)
In PPPo[E|L2TP] we could explicitly point which net namespace
we're going to use for channels - make it so.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pppoe.c
drivers/net/pppol2tp.c

index fb3056334aac339a97831996dd757280fc08a950..39f3e21647e7a4d6e77a9b7cf22961c03cf7f435 100644 (file)
@@ -695,7 +695,7 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,
                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 f3f9cb1f77c082e7c841233d4cf40ee67c6f8c54..056e22a784b865a279094df69cd6ea55a8fe5848 100644 (file)
@@ -1749,7 +1749,7 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
        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;