Re: [PATCH v3 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-10 Thread Tom Parkin
On Mon, Dec 07, 2020 at 17:22:28 +0100, Guillaume Nault wrote: > On Fri, Dec 04, 2020 at 04:36:55PM +, Tom Parkin wrote: > > + case PPPIOCBRIDGECHAN: > > + if (get_user(unit, p)) > > + break; > > + err = -ENXIO; > > +

Re: [PATCH v3 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-10 Thread Guillaume Nault
On Thu, Dec 10, 2020 at 02:46:23PM +, Tom Parkin wrote: > On Mon, Dec 07, 2020 at 17:22:28 +0100, Guillaume Nault wrote: > > On Fri, Dec 04, 2020 at 04:36:55PM +, Tom Parkin wrote: > > > + case PPPIOCBRIDGECHAN: > > > + if (get_user(unit, p)) > > > +

Re: [PATCH v3 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-07 Thread Guillaume Nault
On Fri, Dec 04, 2020 at 04:36:55PM +, Tom Parkin wrote: > +static int ppp_unbridge_channels(struct channel *pch) > +{ > + struct channel *pchb, *pchbb; > + > + write_lock_bh(&pch->upl); > + pchb = rcu_dereference_protected(pch->bridge, > lockdep_is_held(&pch->upl)); > + if (!pc

[PATCH v3 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-04 Thread Tom Parkin
This new ioctl pair allows two ppp channels to be bridged together: frames arriving in one channel are transmitted in the other channel and vice versa. The practical use for this is primarily to support the L2TP Access Concentrator use-case. The end-user session is presented as a ppp channel (typ