Skip to contentSkip to conversation

l2tp: split pppol2tp into separate l2tp and ppp parts

RFC PATCH In review James Chapman 1 participant 1 message Feb 22, 2009

Subsystems (3)
lore
Share & tools
lore

James Chapman

author maintainer
#0 lore raw

RFC PATCH 2/8 l2tp: split pppol2tp into separate l2tp and ppp parts

This patch splits the pppol2tp driver into separate L2TP and PPP parts to prepare for L2TPv3 support. In L2TPv3, protocols other than PPP can be carried over L2TP, so this split creates a common L2TP core which will handle the common L2TP bits which protocol support modules such as PPP will use.

Note that the existing pppol2tp module is split into l2tp_core and l2tp_ppp by this change.

There are no feature changes here. Internally, however, there are significant changes, mostly to handle the separation of PPP-specific data from the L2TP session and to provide hooks in the core for modules like PPP to access.

---

Are there backwards compatibility issues in splitting an existing kernel module like this?
Old: modprobe pppol2tp
New: modprobe l2tp_ppp

Reviewing this patch is diffcult because one file is replaced by two and both need changes in order for the result to compile and run. Git bisect is our friend.

net/l2tp/Makefile +5 -1
Index: net-next-2.6-l2tpv3-2/net/l2tp/Makefile
===================================================================
@@ -2,4 +2,8 @@
 # Makefile for the L2TP.
 #
 
-obj-$(CONFIG_PPPOL2TP) += pppol2tp.o
+obj-$(CONFIG_L2TP) += l2tp_core.o
+
+# Build l2tp as modules if L2TP is M
+obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_PPPOL2TP)) += l2tp_ppp.o
+
net/l2tp/l2tp_core.c new file +1319 -0

1,319 lines not on this page · raw message

net/l2tp/l2tp_core.h new file +227 -0

227 lines not on this page · raw message

net/l2tp/Kconfig +25 -0
Index: net-next-2.6-l2tpv3-2/net/l2tp/Kconfig
===================================================================
@@ -1,3 +1,28 @@
 #
 # Layer Two Tunneling Protocol (L2TP)
 #
+
+menuconfig L2TP
+	tristate "Layer Two Tunneling Protocol (L2TP)"
+	depends on INET
+	---help---
+	  Layer Two Tunneling Protocol
+
+	  From RFC 2661 <http://www.ietf.org/rfc/rfc2661.txt>.
+
+	  L2TP facilitates the tunneling of packets across an
+	  intervening network in a way that is as transparent as
+	  possible to both end-users and applications.
+
+	  L2TP is often used to tunnel PPP traffic over IP
+	  tunnels. One IP tunnel may carry thousands of individual PPP
+	  connections. L2TP is also used as a VPN protocol, popular
+	  with home workers to connect to their offices.
+
+	  The kernel component handles only L2TP data packets: a
+	  userland daemon handles L2TP the control protocol (tunnel
+	  and session setup). One such daemon is OpenL2TP
+	  (http://openl2tp.org/).
+
+	  If you don't need L2TP, say N. To compile all L2TP code as
+	  modules, choose M here.
net/l2tp/l2tp_ppp.c new file +1484 -0

1,417 lines not on this page · raw message

drivers/net/Kconfig +1 -6
Index: net-next-2.6-l2tpv3-2/drivers/net/Kconfig
===================================================================

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.