From 3067912ddd53234b068585337cc6dea50abb40ae Mon Sep 17 00:00:00 2001 From: Hamish Guthrie Date: Thu, 3 May 2007 02:51:36 +0000 Subject: [PATCH] Added new package xl2tpd - better l2tpd implementation (see included README) SVN-Revision: 7082 --- net/xl2tpd/Makefile | 60 +++++++++++++++++++++++++++++++++++ net/xl2tpd/README | 23 ++++++++++++++ net/xl2tpd/files/l2tp-secrets | 4 +++ net/xl2tpd/files/options.l2tp | 15 +++++++++ net/xl2tpd/files/xl2tpd.conf | 56 ++++++++++++++++++++++++++++++++ net/xl2tpd/files/xl2tpd.init | 19 +++++++++++ 6 files changed, 177 insertions(+) create mode 100644 net/xl2tpd/Makefile create mode 100644 net/xl2tpd/README create mode 100644 net/xl2tpd/files/l2tp-secrets create mode 100644 net/xl2tpd/files/options.l2tp create mode 100644 net/xl2tpd/files/xl2tpd.conf create mode 100644 net/xl2tpd/files/xl2tpd.init diff --git a/net/xl2tpd/Makefile b/net/xl2tpd/Makefile new file mode 100644 index 0000000000..02862e3e02 --- /dev/null +++ b/net/xl2tpd/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xl2tpd +PKG_VERSION:=1.1.09 +PKG_RELEASE:=1.0 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.xelerance.com/software/xl2tpd +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/xl2tpd + SECTION:=net + CATEGORY:=Network + TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon + DESCRIPTION:=\ + l2tpd is the open source implementation of the L2TP tunneling \\\ + protocol (RFC2661). It does implement both LAC and LNS role \\\ + in a L2TP networking architecture. The main goal of this protocol is \\\ + to tunnel PPP frame trough an ip network. + URL:=http://www.xelerance.com/software/xl2tpd +endef + +define Package/xl2tpd/conffiles +/etc/xl2tpd/xl2tpd.conf +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS) -I. -DLINUX -DSANITY -DIP_ALLOCATION" \ + ) +endef + +define Package/xl2tpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/xl2tpd + $(INSTALL_DATA) ./files/xl2tpd.conf $(1)/etc/xl2tpd/ + $(INSTALL_DATA) ./files/l2tp-secrets $(1)/etc/xl2tpd/ + $(INSTALL_DATA) ./files/options.l2tp $(1)/etc/xl2tpd/ +# $(INSTALL_DIR) $(1)/etc/ppp +# $(INSTALL_DATA) ./files/options.l2tpd $(1)/etc/ppp/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/xl2tpd.init $(1)/etc/init.d/xl2tpd +endef + +$(eval $(call BuildPackage,xl2tpd)) + diff --git a/net/xl2tpd/README b/net/xl2tpd/README new file mode 100644 index 0000000000..aadc26e4ec --- /dev/null +++ b/net/xl2tpd/README @@ -0,0 +1,23 @@ +OpenWRT Package for xl2tpd + +xl2tpd is a development from the original l2tpd package originally written by +Mark Spencer, subsequently forked by Scott Balmos and David Stipp, inherited +by Jeff McAdams, modified substantially by Jacco de Leeuw and then forked +again by Xelerance (after it was abandoned by l2tpd.org). + +Rationale for inclusion in OpenWRT: + +l2tpd has some serious alignment problems on RISC platforms. It also runs +purely in userspace. + +Some of the features added in this fork include: + +1. IPSec SA reference tracking inconjunction with openswan's IPSec transport + mode, which adds support for multiple clients behind the same NAT router + and multiple clients on the same internal IP behind different NAT routers. + +2. Support for the pppol2tp kernel mode L2TP. + +3. Alignment and endian problems resolved. + +hcg diff --git a/net/xl2tpd/files/l2tp-secrets b/net/xl2tpd/files/l2tp-secrets new file mode 100644 index 0000000000..26ec689de6 --- /dev/null +++ b/net/xl2tpd/files/l2tp-secrets @@ -0,0 +1,4 @@ +uthenticating l2tp tunnels +# us them secret +mia zidler abcd1234 + diff --git a/net/xl2tpd/files/options.l2tp b/net/xl2tpd/files/options.l2tp new file mode 100644 index 0000000000..5eaf4b055e --- /dev/null +++ b/net/xl2tpd/files/options.l2tp @@ -0,0 +1,15 @@ +# + +lock +noauth +debug +dump +logfd 2 +logfile /var/log/l2tpd.log +noccp +novj +novjccomp +nopcomp +noaccomp + + diff --git a/net/xl2tpd/files/xl2tpd.conf b/net/xl2tpd/files/xl2tpd.conf new file mode 100644 index 0000000000..9ad769d73a --- /dev/null +++ b/net/xl2tpd/files/xl2tpd.conf @@ -0,0 +1,56 @@ +[global] +port = 1701 +auth file = /etc/xl2tpd/l2tp-secrets +access control = no +; rand source = dev + +[lns default] +exclusive = yes +ip range = 192.168.254.202-192.168.254.210 +lac = 10.0.1.2 +hidden bit = no +local ip = 192.168.254.200 +length bit = yes +refuse authentication = yes +;require chap = yes +;refuse pap = yes +;refuse chap = no +;require authentication = yes +;unix authentication = no +name = VersaLink +ppp debug = yes +pppoptfile = /etc/xl2tpd/options.l2tp +; call rws = 10 +; tunnel rws = 4 +; flow bit = yes +; challenge = yes +; + +[lac left] +lns = 10.0.1.2 +; lns = lns2.marko.net +; redial = yes +; redial timeout = 15 +; max redials = 5 +; hidden bit = yes +; local ip = 192.168.1.1 +; remote ip = 192.168.1.2 +; length bit = no +refuse authentication = yes +; require pap = no +; require chap = yes +; refuse pap = yes +; refuse chap = no +; require authentication = yes +name = VersaLink +ppp debug = yes +; pppoptfile = /etc/ppp/options +pppoptfile = /etc/xl2tpd/options.l2tp +; call rws = 10 +; tunnel rws = 4 +; flow bit = yes +; challenge = yes +; +; [lac cisco] +; lns = cisco.marko.net +; require authentication = yes diff --git a/net/xl2tpd/files/xl2tpd.init b/net/xl2tpd/files/xl2tpd.init new file mode 100644 index 0000000000..83d816438f --- /dev/null +++ b/net/xl2tpd/files/xl2tpd.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=xl2tpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + mkdir -p $RUN_D/$BIN + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + -- 2.30.2