netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling
@ 2018-08-10 11:21 Guillaume Nault
  2018-08-10 11:21 ` [PATCH net-next 1/8] l2tp: define l2tp_tunnel_uses_xfrm() Guillaume Nault
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Guillaume Nault @ 2018-08-10 11:21 UTC (permalink / raw)
  To: netdev; +Cc: James Chapman

The current ioctl() handling code can be simplified. It tests for
non-relevant conditions and uselessly holds sockets. Once useless
code is removed, it becomes even simpler to let pppol2tp_ioctl() handle
commands directly, rather than dispatch them to pppol2tp_tunnel_ioctl()
or pppol2tp_session_ioctl(). That is the approach taken by this series.

Patch #1 and #2 define helper functions aimed at simplifying the rest
of the patch set.

Patch #3 drops useless tests in pppol2p_ioctl() and avoid holding a
refcount on the socket.

Patches #4, #5 and #6 are the core of the series. They let
pppol2tp_ioctl() handle all ioctls and drop the tunnel and session
specific functions.

Then patch #6 brings a little bit of consolidation.

Finally, patch #7 takes advantage of the simplified code to make
pppol2tp sockets compatible with dev_ioctl(). Certainly not a killer
feature, but it is trivial and it is always nice to see l2tp getting
better integration with the rest of the stack.

Guillaume Nault (8):
  l2tp: define l2tp_tunnel_uses_xfrm()
  l2tp: split l2tp_session_get()
  l2tp: simplify pppol2tp_ioctl()
  l2tp: handle PPPIOC[GS]MRU and PPPIOC[GS]FLAGS in pppol2tp_ioctl()
  l2tp: remove pppol2tp_tunnel_ioctl()
  l2tp: remove pppol2tp_session_ioctl()
  l2tp: zero out stats in pppol2tp_copy_stats()
  l2tp: let pppol2tp_ioctl() fallback to dev_ioctl()

 include/uapi/linux/ppp-ioctl.h |   2 +-
 net/l2tp/l2tp_core.c           |  50 +++----
 net/l2tp/l2tp_core.h           |  25 +++-
 net/l2tp/l2tp_ip.c             |   2 +-
 net/l2tp/l2tp_ip6.c            |   2 +-
 net/l2tp/l2tp_netlink.c        |  11 +-
 net/l2tp/l2tp_ppp.c            | 240 +++++++++++----------------------
 7 files changed, 133 insertions(+), 199 deletions(-)

-- 
2.18.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-08-11 22:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 11:21 [PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 1/8] l2tp: define l2tp_tunnel_uses_xfrm() Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 2/8] l2tp: split l2tp_session_get() Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 3/8] l2tp: simplify pppol2tp_ioctl() Guillaume Nault
2018-08-10 11:21 ` [PATCH net-next 4/8] l2tp: handle PPPIOC[GS]MRU and PPPIOC[GS]FLAGS in pppol2tp_ioctl() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 5/8] l2tp: remove pppol2tp_tunnel_ioctl() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 6/8] l2tp: remove pppol2tp_session_ioctl() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 7/8] l2tp: zero out stats in pppol2tp_copy_stats() Guillaume Nault
2018-08-10 11:22 ` [PATCH net-next 8/8] l2tp: let pppol2tp_ioctl() fallback to dev_ioctl() Guillaume Nault
2018-08-11 19:19 ` [PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling David Miller

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).