Skip to content

Commit fd558d1

Browse files
j-c-hdavem330
authored andcommitted
l2tp: Split pppol2tp patch 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, so this split creates a common L2TP core that 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. Signed-off-by: James Chapman <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 21b4aaa commit fd558d1

File tree

10 files changed

+3175
-2689
lines changed

10 files changed

+3175
-2689
lines changed

drivers/net/Kconfig

+1-6
Original file line numberDiff line numberDiff line change
@@ -3158,17 +3158,12 @@ config PPPOATM
31583158

31593159
config PPPOL2TP
31603160
tristate "PPP over L2TP (EXPERIMENTAL)"
3161-
depends on EXPERIMENTAL && PPP && INET
3161+
depends on EXPERIMENTAL && L2TP && PPP
31623162
help
31633163
Support for PPP-over-L2TP socket family. L2TP is a protocol
31643164
used by ISPs and enterprises to tunnel PPP traffic over UDP
31653165
tunnels. L2TP is replacing PPTP for VPN uses.
31663166

3167-
This kernel component handles only L2TP data packets: a
3168-
userland daemon handles L2TP the control protocol (tunnel
3169-
and session setup). One such daemon is OpenL2TP
3170-
(http://openl2tp.sourceforge.net/).
3171-
31723167
config SLIP
31733168
tristate "SLIP (serial line) support"
31743169
---help---

include/linux/if_pppol2tp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661)
33
*
44
* This file supplies definitions required by the PPP over L2TP driver
5-
* (pppol2tp.c). All version information wrt this file is located in pppol2tp.c
5+
* (l2tp_ppp.c). All version information wrt this file is located in l2tp_ppp.c
66
*
77
* License:
88
* This program is free software; you can redistribute it and/or

net/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ source "net/sctp/Kconfig"
186186
source "net/rds/Kconfig"
187187
source "net/tipc/Kconfig"
188188
source "net/atm/Kconfig"
189+
source "net/l2tp/Kconfig"
189190
source "net/802/Kconfig"
190191
source "net/bridge/Kconfig"
191192
source "net/dsa/Kconfig"

net/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ obj-$(CONFIG_BT) += bluetooth/
4040
obj-$(CONFIG_SUNRPC) += sunrpc/
4141
obj-$(CONFIG_AF_RXRPC) += rxrpc/
4242
obj-$(CONFIG_ATM) += atm/
43-
obj-$(CONFIG_PPPOL2TP) += l2tp/
43+
obj-$(CONFIG_L2TP) += l2tp/
4444
obj-$(CONFIG_DECNET) += decnet/
4545
obj-$(CONFIG_ECONET) += econet/
4646
obj-$(CONFIG_PHONET) += phonet/

net/l2tp/Kconfig

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Layer Two Tunneling Protocol (L2TP)
3+
#
4+
5+
menuconfig L2TP
6+
tristate "Layer Two Tunneling Protocol (L2TP)"
7+
depends on INET
8+
---help---
9+
Layer Two Tunneling Protocol
10+
11+
From RFC 2661 <http://www.ietf.org/rfc/rfc2661.txt>.
12+
13+
L2TP facilitates the tunneling of packets across an
14+
intervening network in a way that is as transparent as
15+
possible to both end-users and applications.
16+
17+
L2TP is often used to tunnel PPP traffic over IP
18+
tunnels. One IP tunnel may carry thousands of individual PPP
19+
connections. L2TP is also used as a VPN protocol, popular
20+
with home workers to connect to their offices.
21+
22+
The kernel component handles only L2TP data packets: a
23+
userland daemon handles L2TP the control protocol (tunnel
24+
and session setup). One such daemon is OpenL2TP
25+
(http://openl2tp.org/).
26+
27+
If you don't need L2TP, say N. To compile all L2TP code as
28+
modules, choose M here.

net/l2tp/Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
# Makefile for the L2TP.
33
#
44

5-
obj-$(CONFIG_PPPOL2TP) += pppol2tp.o
5+
obj-$(CONFIG_L2TP) += l2tp_core.o
6+
7+
# Build l2tp as modules if L2TP is M
8+
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_PPPOL2TP)) += l2tp_ppp.o

0 commit comments

Comments
 (0)