Skip to content

Commit

Permalink
net: pppoe,pppol2tp - register channels with explicit net
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cyrill Gorcunov authored and David S. Miller committed Jan 21, 2009
1 parent 273ec51 commit f5882c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/pppol2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f5882c3

Please sign in to comment.