mtpd: Use L2TP implementation from mainline kernel

Add upstream kernel implementation of L2TP protocol (OL2TP). This code
uses pppol2tp-android plugin, which was added to pppd project.

mtpd will try to use OL2TP protocol (upstream) by default. In case if
OL2TP is disabled in kernel, mtpd will fall back to old OLAC protocol.

After this patch, old implementation (PX_PROTO_OLAC) can be dropped from
Android kernel. After some transition time we can keep only OL2TP support
in mtpd and drop OLAC support for good.

In order to use this L2TP implementation, next kernel options should be
enabled:

    CONFIG_NET_IPGRE_DEMUX=y
    CONFIG_PPPOE=y
    CONFIG_L2TP=y
    CONFIG_PPPOL2TP=y

For more details see: [1].

[1] https://wiki.linaro.org/LMG/Kernel/PPP

Change-Id: Ifb0e023817039af7a11353c0568b8c3dd234cc53
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
3 files changed
tree: ec0761d6c92e90aae551dc16b59d4400d545e52d
  1. Android.bp
  2. l2tp.c
  3. MODULE_LICENSE_APACHE2
  4. mtpd.c
  5. mtpd.h
  6. mtpd.rc
  7. NOTICE
  8. pptp.c