Skip to content

l2tp: Introduce L2TPv3 support

James Chapman netdev 4 versions – Applied

Status from this message: Applied, thanks Eric.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 7 repliesApplied
  2. v312 patches 19 repliesSuperseded
  3. v212 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v112 patches4 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/14l2tp: Relocate pppol2tp driver to new net/l2tp directorydrivers/net/Makefile drivers/net/pppol2tp.c net/Makefile +2 more+2687 -26810 replies
2/14l2tp: Split pppol2tp patch into separate l2tp and ppp partsdrivers/net/Kconfig include/linux/if_pppol2tp.h net/Kconfig +7 more+3175 -26890 replies
3/14ppp: Add ppp_dev_name() exported functiondrivers/net/ppp_generic.c include/linux/ppp_channel.h+22 -00 replies
4/14l2tp: Add ppp device name to L2TP ppp session datanet/l2tp/l2tp_ppp.c+4 -00 replies
5/14l2tp: Add L2TPv3 protocol supportnet/l2tp/Kconfig net/l2tp/l2tp_core.c net/l2tp/l2tp_core.h +1 more+484 -1480 replies
6/14l2tp: Update PPP-over-L2TP driver to work over L2TPv3include/linux/if_pppol2tp.h include/linux/if_pppox.h net/l2tp/l2tp_ppp.c+97 -460 replies
7/14l2tp: Add L2TPv3 IP encapsulation (no UDP) supportinclude/linux/l2tp.h net/l2tp/Kconfig net/l2tp/Makefile +4 more+850 -620 replies
8/14netlink: Export genl_lock() API for use by modulesinclude/linux/genetlink.h net/netlink/genetlink.c+12 -20 replies
9/14l2tp: Add netlink control API for L2TPinclude/linux/l2tp.h net/l2tp/Makefile net/l2tp/l2tp_core.c +3 more+1169 -440 replies
10/14l2tp: Convert rwlock to RCUnet/l2tp/l2tp_core.c+42 -362 replies
11/14l2tp: Add L2TP ethernet pseudowire supportnet/l2tp/Kconfig net/l2tp/Makefile net/l2tp/l2tp_eth.c+372 -00 replies
12/14l2tp: Add debugfs files for dumping l2tp debug infonet/l2tp/Kconfig net/l2tp/Makefile net/l2tp/l2tp_core.h +3 more+392 -20 replies
13/14l2tp: Add support for static unmanaged L2TPv3 tunnelsnet/l2tp/l2tp_core.c net/l2tp/l2tp_core.h net/l2tp/l2tp_netlink.c+126 -140 replies
14/14l2tp: Update documentationDocumentation/networking/l2tp.txt+213 -340 replies

Reviews trailers per patch

12 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRandy Dunlap
SeriesR-b
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14
11/14R-b
12/14
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next-2.6 v4 00/14] l2tp: Introduce L2TPv3 support

This patch series adds L2TPv3 support. It splits the existing pppol2tp driver to separate its L2TP and PPP parts, then adds new L2TPv3 functionality. The patches implement a new socket family for L2TPv3 IP encapsulation, expose virtual netdevices for each L2TPv3 ethernet pseudowire and add a netlink interface.

The following drivers are provided:-

l2tp_core    - L2TP driver core. Always required.
l2tp_ppp     - L2TP PPP (PPPoL2TP). L2TPv2 and L2TPv3.
l2tp_eth     - L2TPv3 ethernet pseudowire.
l2tp_ip      - L2TPv3 IP encapsulation.

l2tp_netlink - L2TPv3 netlink API.
l2tp_debugfs - L2TP debugfs files.

The combination of l2tp_core and l2tp_ppp provides backwards-compatible L2TPv2 pppol2tp functionality. Userspace L2TPv2 applications using the existing pppol2tp driver should not need to change.

The implementation is as I described in a previous posting to netdev, archived at
http://marc.info/?l=linux-netdev&m=120845482320143&w=4. Unfortunately, splitting the existing pppol2tp driver into l2tp_core and l2tp_ppp makes the changes difficult to review. The split is needed to separate PPP from L2TP, since in L2TPv3, protocols other than PPP can be carried. I have organised the patches so that the split is done first, with new features added in separate patches.

Relevant RFCs are:-
- http://www.ietf.org/rfc/rfc3931.txt (L2TPv3)
- http://www.ietf.org/rfc/rfc4719.txt (L2TPv3 ethernet pseudowire)

A patchset is available to iproute2 which adds a number of commands for unmanaged L2TPv3 tunnels. This will be submitted separately.

TODO:-
- Add L2TP tunnel switching.
- Add IP pseudowires. These carry only IP frames (no L2 header).
- Add VLAN pseudowires.
- Add ATM pseudowires - RFC3355 and RFC4454.

---

Changelog:-

v4 (02-apr-2010, this version)

- Remove useless BUG_ON in l2tp_eth driver. (Stephen Hemminger)

- Use random_ether_addr() when deriving MAC address for virtual device of each ethernet pseudowire instead of deriving one based on the L2TP session id. (Stephen Hemminger)

- Convert per_net locks from rwlock to spinlock / rcu. (Stephen Hemminger)

- Rework /proc interface to move all new (L2TPv3 etc) debug info to debugfs. Retain existing /proc file for backwards compability with the old pppol2tp driver. Debugfs is added in a new patch. (Stephen Hemminger, David Miller)

- Add new config option to enable the debugfs file(s) for l2tp.

- Change all flag parameters in the netlink API to u8. (Patrick McHardy)

- Update info about /proc and /debugfs in l2tp documentation.

v3 (31-mar-2010)

- Use hash_32() instead of hash_long() for better efficiency on 64-bit archs (Eric Dumazet)

- Add missing setting of sk->sk_no_check for the case when creating kernel socket for the unmanaged tunnel case. (Eric Dumazet)

- Fix a dev_put leak for the case when user creates an ethernet pseudowire with a specific device name and a device with that name already exists. (Eric Dumazet)

- Use dev_forward_skb() in receive path of l2tp_eth driver.

v2 (29-mar-2010)

- Fix compile error when CONFIG_COMPAT is defined. Since l2tp_ip is not a UDP socket, use compat_ip_[gs]etsockopt directly instead of config_udp_[gs]etsockopt. (David Miller)

- Fix whitespace issues found by
git apply --check --whitespace=error-all (David Miller)

James Chapman (14):
l2tp: Relocate pppol2tp driver to new net/l2tp directory
l2tp: Split pppol2tp patch into separate l2tp and ppp parts
ppp: Add ppp_dev_name() exported function
l2tp: Add ppp device name to L2TP ppp session data
l2tp: Add L2TPv3 protocol support
l2tp: Update PPP-over-L2TP driver to work over L2TPv3
l2tp: Add L2TPv3 IP encapsulation (no UDP) support
netlink: Export genl_lock() API for use by modules
l2tp: Add netlink control API for L2TP
l2tp: Convert rwlock to RCU
l2tp: Add L2TP ethernet pseudowire support
l2tp: Add debugfs files for dumping l2tp debug info
l2tp: Add support for static unmanaged L2TPv3 tunnels
l2tp: Update documentation

 Documentation/networking/l2tp.txt |  247 +++
 drivers/net/Kconfig               |    7 
 drivers/net/Makefile              |    2 
 drivers/net/ppp_generic.c         |   19 
 drivers/net/pppol2tp.c            | 2680 -------------------------------------
 include/linux/genetlink.h         |    8 
 include/linux/if_pppol2tp.h       |   16 
 include/linux/if_pppox.h          |    9 
 include/linux/l2tp.h              |  163 ++
 include/linux/ppp_channel.h       |    3 
 net/Kconfig                       |    1 
 net/Makefile                      |    1 
 net/l2tp/Kconfig                  |  107 +
 net/l2tp/Makefile                 |   12 
 net/l2tp/l2tp_core.c              | 1692 +++++++++++++++++++++++
 net/l2tp/l2tp_core.h              |  304 ++++
 net/l2tp/l2tp_debugfs.c           |  341 +++++
 net/l2tp/l2tp_eth.c               |  361 +++++
 net/l2tp/l2tp_ip.c                |  679 +++++++++
 net/l2tp/l2tp_netlink.c           |  840 ++++++++++++
 net/l2tp/l2tp_ppp.c               | 1837 +++++++++++++++++++++++++
 net/netlink/genetlink.c           |    6 
 22 files changed, 6611 insertions(+), 2724 deletions(-)
 delete mode 100644 drivers/net/pppol2tp.c
 create mode 100644 include/linux/l2tp.h
 create mode 100644 net/l2tp/Kconfig
 create mode 100644 net/l2tp/Makefile
 create mode 100644 net/l2tp/l2tp_core.c
 create mode 100644 net/l2tp/l2tp_core.h
 create mode 100644 net/l2tp/l2tp_debugfs.c
 create mode 100644 net/l2tp/l2tp_eth.c
 create mode 100644 net/l2tp/l2tp_ip.c
 create mode 100644 net/l2tp/l2tp_netlink.c
 create mode 100644 net/l2tp/l2tp_ppp.c