Hi,

this patch updates xl2tpd to 1.2.5. From the changelog:

* Fix initscript for
https://bugzilla.redhat.com/show_bug.cgi%3Fid%3D247100
* Fix for two Windows machines behind the same NAT with the same
  number of l2tp connection attempts since boot [Shinichi Furuso]

Changes in this patch:

* use PKG_INSTALL:=1
* use standard config file names like in other major distributions
* new patch to disable building pfc (which was not installed anyway),
  removes dependency to libpcap
* include a commented sample config file
* use INSTALL_CONF instead of INSTALL_DATA + chmod 0600

-Raphael
diff -pruN xl2tpd.orig/files/options.xl2tpd xl2tpd/files/options.xl2tpd
--- xl2tpd.orig/files/options.xl2tpd	1970-01-01 01:00:00.000000000 +0100
+++ xl2tpd/files/options.xl2tpd	2010-03-17 14:52:16.000000000 +0100
@@ -0,0 +1,13 @@
+#
+
+lock
+noauth
+debug
+dump
+logfd 2
+logfile /var/log/xl2tpd.log
+noccp
+novj
+novjccomp
+nopcomp
+noaccomp
diff -pruN xl2tpd.orig/files/ppp.options xl2tpd/files/ppp.options
--- xl2tpd.orig/files/ppp.options	2010-03-17 14:44:10.000000000 +0100
+++ xl2tpd/files/ppp.options	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-#
-
-lock         
-noauth    
-debug        
-dump         
-logfd 2      
-logfile /var/log/xl2tpd.log  
-noccp 
-novj 
-novjccomp 
-nopcomp 
-noaccomp
-
-
diff -pruN xl2tpd.orig/files/ppp.secrets xl2tpd/files/ppp.secrets
--- xl2tpd.orig/files/ppp.secrets	2010-03-17 14:44:10.000000000 +0100
+++ xl2tpd/files/ppp.secrets	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-uthenticating l2tp tunnels
-# us    them    secret
-mia     zidler  abcd1234
-
diff -pruN xl2tpd.orig/files/xl2tpd.conf xl2tpd/files/xl2tpd.conf
--- xl2tpd.orig/files/xl2tpd.conf	2010-03-17 14:44:10.000000000 +0100
+++ xl2tpd/files/xl2tpd.conf	2010-03-17 16:19:48.000000000 +0100
@@ -1,8 +1,7 @@
 [global]
 port = 1701
-auth file = /etc/xl2tpd/ppp.secrets
+auth file = /etc/xl2tpd/xl2tp-secrets
 access control = no
-; rand source = dev
 
 [lns default]
 exclusive = yes
@@ -12,44 +11,13 @@ 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/ppp.options
-; call rws = 10
-; tunnel rws = 4
-; flow bit = yes
-; challenge = yes
-;
+pppoptfile = /etc/ppp/options.xl2tpd
 
 [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/xl2tpd/ppp.options
-; call rws = 10
-; tunnel rws = 4
-; flow bit = yes
-; challenge = yes
-;
-; [lac cisco]
-; lns = cisco.marko.net
-; require authentication = yes
+pppoptfile = /etc/ppp/options.xl2tpd
diff -pruN xl2tpd.orig/files/xl2tpd.conf.sample xl2tpd/files/xl2tpd.conf.sample
--- xl2tpd.orig/files/xl2tpd.conf.sample	1970-01-01 01:00:00.000000000 +0100
+++ xl2tpd/files/xl2tpd.conf.sample	2010-03-17 16:15:25.000000000 +0100
@@ -0,0 +1,73 @@
+;
+; Sample l2tpd configuration file
+;
+; This example file should give you some idea of how the options for l2tpd
+; should work.  The best place to look for a list of all options is in
+; the source code itself, until I have the time to write better documetation :)
+; Specifically, the file "file.c" contains a list of commands at the end.
+;
+; You most definitely don't have to spell out everything as it is done here
+;
+; [global]										; Global parameters:
+; port = 1701									; * Bind to port 1701
+; auth file = /etc/xl2tpd/xl2tp-secrets			; * Where our challenge secrets are
+; access control = yes							; * Refuse connections without IP match
+; rand source = dev								; Source for entropy for random
+; 												; numbers, options are:
+; 												; dev - reads of /dev/urandom
+; 												; sys - uses rand()
+; 												; egd - reads from egd socket
+; 												; egd is not yet implemented
+;
+; [lns default]									; Our fallthrough LNS definition
+; exclusive = no								; * Only permit one tunnel per host
+; ip range = 192.168.0.1-192.168.0.20			; * Allocate from this IP range
+; no ip range = 192.168.0.3-192.168.0.9			; * Except these hosts
+; ip range = 192.168.0.5						; * But this one is okay
+; ip range = lac1-lac2							; * And anything from lac1 to lac2's IP
+; lac = 192.168.1.4 - 192.168.1.8				; * These can connect as LAC's
+; no lac = untrusted.marko.net					; * This guy can't connect
+; hidden bit = no								; * Use hidden AVP's?
+; local ip = 192.168.1.2						; * Our local IP to use
+; length bit = yes								; * Use length bit in payload?
+; require chap = yes							; * Require CHAP auth. by peer
+; refuse pap = yes								; * Refuse PAP authentication
+; refuse chap = no								; * Refuse CHAP authentication
+; refuse authentication = no					; * Refuse authentication altogether
+; require authentication = yes					; * Require peer to authenticate
+; unix authentication = no						; * Use /etc/passwd for auth.
+; name = myhostname								; * Report this as our hostname
+; ppp debug = no								; * Turn on PPP debugging
+; pppoptfile = /etc/ppp/options.xl2tpd.lns		; * ppp options file
+; call rws = 10									; * RWS for call (-1 is valid)
+; tunnel rws = 4								; * RWS for tunnel (must be > 0)
+; flow bit = yes								; * Include sequence numbers
+; challenge = yes								; * Challenge authenticate peer ;
+;
+; [lac marko]									; Example VPN LAC definition
+; lns = lns.marko.net							; * Who is our LNS?
+; lns = lns2.marko.net							; * A backup LNS (not yet used)
+; redial = yes									; * Redial if disconnected?
+; redial timeout = 15							; * Wait n seconds between redials
+; max redials = 5								; * Give up after n consecutive failures
+; hidden bit = yes								; * User hidden AVP's?
+; local ip = 192.168.1.1						; * Force peer to use this IP for us
+; remote ip = 192.168.1.2						; * Force peer to use this as their IP
+; length bit = no								; * Use length bit in payload?
+; require pap = no								; * Require PAP auth. by peer
+; require chap = yes							; * Require CHAP auth. by peer
+; refuse pap = yes								; * Refuse PAP authentication
+; refuse chap = no								; * Refuse CHAP authentication
+; refuse authentication = no					; * Refuse authentication altogether
+; require authentication = yes					; * Require peer to authenticate
+; name = marko									; * Report this as our hostname
+; ppp debug = no								; * Turn on PPP debugging
+; pppoptfile = /etc/ppp/options.xl2tpd.marko	; * ppp options file for this lac
+; call rws = 10									; * RWS for call (-1 is valid)
+; tunnel rws = 4								; * RWS for tunnel (must be > 0)
+; flow bit = yes								; * Include sequence numbers
+; challenge = yes								; * Challenge authenticate peer
+;
+; [lac cisco]									; Another quick LAC
+; lns = cisco.marko.net							; * Required, but can take from default
+; require authentication = yes
diff -pruN xl2tpd.orig/files/xl2tpd.init xl2tpd/files/xl2tpd.init
--- xl2tpd.orig/files/xl2tpd.init	2010-02-12 09:45:42.000000000 +0100
+++ xl2tpd/files/xl2tpd.init	2010-03-17 14:51:37.000000000 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 
 START=60
 BIN=xl2tpd
@@ -16,4 +16,3 @@ start() {
 stop() {
 	[ -f $PID_F ] && kill $(cat $PID_F)
 }
-
diff -pruN xl2tpd.orig/files/xl2tp-secrets xl2tpd/files/xl2tp-secrets
--- xl2tpd.orig/files/xl2tp-secrets	1970-01-01 01:00:00.000000000 +0100
+++ xl2tpd/files/xl2tp-secrets	2010-03-17 16:17:55.000000000 +0100
@@ -0,0 +1,5 @@
+# Secrets for authenticating l2tp tunnels
+# us		them		secret
+# *		marko		blah2
+# zeus		marko		blah
+# *		*		interop
diff -pruN xl2tpd.orig/Makefile xl2tpd/Makefile
--- xl2tpd.orig/Makefile	2010-02-12 09:45:42.000000000 +0100
+++ xl2tpd/Makefile	2010-03-17 17:32:46.000000000 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,29 +8,30 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xl2tpd
-PKG_VERSION:=1.2.4
+PKG_VERSION:=1.2.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.xelerance.com/software/xl2tpd
-PKG_MD5SUM:=d94fc8a13596f12a561240dfcea9f977
+PKG_SOURCE_URL:=ftp://ftp.xelerance.com/xl2tpd/
+PKG_MD5SUM:=40404ea230edd9ebdd0d53f07c832520
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/xl2tpd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpcap
+  DEPENDS:=
   TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
-  URL:=http://www.xelerance.com/software/xl2tpd
+  URL:=http://www.xelerance.com/software/xl2tpd/
   SUBMENU:=VPN
 endef
 
 define Package/xl2tpd/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.
+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.
 endef
 
 # XXX: CFLAGS are already set by Build/Compile/Default
@@ -38,21 +39,24 @@ MAKE_FLAGS+= \
 	OFLAGS=""
 
 define Package/xl2tpd/conffiles
-/etc/xl2tpd/ppp.options
-/etc/xl2tpd/ppp.secrets
 /etc/xl2tpd/xl2tpd.conf
+/etc/xl2tpd/xl2tp-secrets
+/etc/ppp/options.xl2tpd
 endef
 
 define Package/xl2tpd/install
 	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/xl2tpd $(1)/usr/sbin/
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/xl2tpd $(1)/usr/sbin/
+
 	$(INSTALL_DIR) $(1)/etc/init.d
 	$(INSTALL_BIN) ./files/xl2tpd.init $(1)/etc/init.d/xl2tpd
+
 	$(INSTALL_DIR) $(1)/etc/xl2tpd
-	$(INSTALL_DATA) ./files/ppp.options $(1)/etc/xl2tpd/
-	$(INSTALL_DATA) ./files/ppp.secrets $(1)/etc/xl2tpd/
 	$(INSTALL_DATA) ./files/xl2tpd.conf $(1)/etc/xl2tpd/
-	chmod 0600 $(1)/etc/xl2tpd/ppp.secrets
+	$(INSTALL_CONF) ./files/xl2tp-secrets $(1)/etc/xl2tpd/
+
+	$(INSTALL_DIR) $(1)/etc/ppp
+	$(INSTALL_DATA) ./files/options.xl2tpd $(1)/etc/ppp/
 endef
 
 $(eval $(call BuildPackage,xl2tpd))
diff -pruN xl2tpd.orig/patches/001-opt_flags.patch xl2tpd/patches/001-opt_flags.patch
--- xl2tpd.orig/patches/001-opt_flags.patch	2010-03-17 14:44:10.000000000 +0100
+++ xl2tpd/patches/001-opt_flags.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -90,7 +90,8 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include
- 
- FFLAGS= -DIP_ALLOCATION
- 
--CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(FFLAGS)
-+OFLAGS=-O2
-+CFLAGS+= $(DFLAGS) $(OFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(FFLAGS)
- HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h
- OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o
- SRCS=${OBJS:.o=.c} ${HDRS}
diff -pruN xl2tpd.orig/patches/100-makefile_opt_flags.patch xl2tpd/patches/100-makefile_opt_flags.patch
--- xl2tpd.orig/patches/100-makefile_opt_flags.patch	1970-01-01 01:00:00.000000000 +0100
+++ xl2tpd/patches/100-makefile_opt_flags.patch	2010-03-17 17:27:17.000000000 +0100
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -90,7 +90,8 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include
+ 
+ FFLAGS= -DIP_ALLOCATION
+ 
+-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(FFLAGS)
++OFLAGS=-O2
++CFLAGS+= $(DFLAGS) $(OFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(FFLAGS)
+ HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h
+ OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o
+ SRCS=${OBJS:.o=.c} ${HDRS}
diff -pruN xl2tpd.orig/patches/110-makefile_dont_build_pfc.patch xl2tpd/patches/110-makefile_dont_build_pfc.patch
--- xl2tpd.orig/patches/110-makefile_dont_build_pfc.patch	1970-01-01 01:00:00.000000000 +0100
+++ xl2tpd/patches/110-makefile_dont_build_pfc.patch	2010-03-17 17:30:37.000000000 +0100
@@ -0,0 +1,40 @@
+--- a/Makefile
++++ b/Makefile
+@@ -104,22 +104,18 @@ BINDIR?=$(DESTDIR)${PREFIX}/bin
+ MANDIR?=$(DESTDIR)${PREFIX}/share/man
+ 
+ 
+-all: $(EXEC) pfc
++all: $(EXEC)
+ 
+ clean:
+-	rm -f $(OBJS) $(EXEC) pfc.o pfc
++	rm -f $(OBJS) $(EXEC)
+ 
+ $(EXEC): $(OBJS) $(HDRS)
+ 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+ 
+-pfc:
+-	$(CC) $(CFLAGS) -c contrib/pfc.c
+-	$(CC) $(LDFLAGS) -lpcap $(LDLIBS) -o pfc pfc.o
+-
+ romfs:
+ 	$(ROMFSINST) /bin/$(EXEC)
+ 
+-install: ${EXEC} pfc
++install: ${EXEC}
+ 	install -d -m 0755 ${SBINDIR}
+ 	install -m 0755 $(EXEC) ${SBINDIR}/$(EXEC)
+ 	install -d -m 0755 ${MANDIR}/man5
+@@ -127,11 +123,6 @@ install: ${EXEC} pfc
+ 	install -m 0644 doc/xl2tpd.8 ${MANDIR}/man8/
+ 	install -m 0644 doc/xl2tpd.conf.5 doc/l2tp-secrets.5 \
+ 		 ${MANDIR}/man5/
+-	# pfc
+-	install -d -m 0755 ${BINDIR}
+-	install -m 0755 pfc ${BINDIR}/pfc
+-	install -d -m 0755 ${MANDIR}/man1
+-	install -m 0644 contrib/pfc.1 ${MANDIR}/man1/
+ 
+ # openbsd
+ #	install -d -m 0755 /var/run/xl2tpd
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to