Hello community,

here is the log from the commit of package xl2tpd for openSUSE:Factory checked 
in at 2019-03-22 14:55:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xl2tpd (Old)
 and      /work/SRC/openSUSE:Factory/.xl2tpd.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xl2tpd"

Fri Mar 22 14:55:25 2019 rev:21 rq:687038 version:1.3.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/xl2tpd/xl2tpd.changes    2017-11-09 
13:58:00.010672327 +0100
+++ /work/SRC/openSUSE:Factory/.xl2tpd.new.25356/xl2tpd.changes 2019-03-22 
14:55:31.950019205 +0100
@@ -1,0 +2,31 @@
+Wed Mar 20 19:03:16 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Drop ||true from %tmpfiles_create, this is already
+  included in the macro.
+- Reduce hard dependency on systemd during build.
+
+-------------------------------------------------------------------
+Fri Mar  8 20:54:23 UTC 2019 - Martin Hauke <[email protected]>
+
+- Run spec-cleaner
+- Remove support for non-systemd distros
+- Remove -doc subpackage (contained only some KB text-files and
+  and manpages)
+- Fix handling of tmpfilesdir
+- Update to version 1.3.13
+  * Fix compile warning with USE_KERNEL in xl2tpd.c
+  * Applying patch that reduces compile warnings and fixes warnings
+    from gcc and clang.
+  * Fix compiler warnings in network.c
+  * Add a preproc for Watchguard firewall (Github issue #136)
+  * Convert from ISO-8859 to UTF-8 [Simon Deziel]
+    Update README to provide latest info on xl2tpd + Linux kernel 4.15+
+- Update to version 1.3.12
+  * TOS value to copy to the tunnel header
+  * Fix for ENODEV (No such device) error with Linux kernel 4.15
+  * Update xl2tpd.init
+  * fix version number and upload
+- Update to version 1.3.11
+  * only changes related to debian packaging
+
+-------------------------------------------------------------------

Old:
----
  v1.3.10.tar.gz

New:
----
  v1.3.13.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xl2tpd.spec ++++++
--- /var/tmp/diff_new_pack.FQJ6ES/_old  2019-03-22 14:55:33.870018079 +0100
+++ /var/tmp/diff_new_pack.FQJ6ES/_new  2019-03-22 14:55:33.874018076 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xl2tpd
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,43 +12,35 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %if 0%{?suse_version} <= 1310
-%define rundir /var/run
+%define rundir %{_localstatedir}/run
 %else
 %define rundir /run
 %endif
-
-Summary:        Layer 2 Tunnelling Protocol Daemon (RFC 2661)
-License:        GPL-2.0
-Group:          Productivity/Networking/System
-
 Name:           xl2tpd
-Version:        1.3.10
+Version:        1.3.13
 Release:        0
-Url:            http://www.xelerance.com/software/xl2tpd/
+Summary:        Layer 2 Tunnelling Protocol Daemon (RFC 2661)
+License:        GPL-2.0-only
+Group:          Productivity/Networking/System
+URL:            http://www.xelerance.com/software/xl2tpd/
 Source0:        https://github.com/xelerance/xl2tpd/archive/v%{version}.tar.gz
 Source1:        %{name}.service
 Source2:        %{name}.conf
 Patch0:         Makefile.patch
 Patch1:         xl2tpd.init.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Requires:       ppp
 BuildRequires:  libpcap
 BuildRequires:  libpcap-devel
-BuildRequires:  linux-kernel-headers
-BuildRequires:  linux-kernel-headers => 2.6.19
+BuildRequires:  linux-kernel-headers >= 2.6.19
+BuildRequires:  systemd-rpm-macros
+Requires:       ppp
 Obsoletes:      l2tpd <= 0.68
 Provides:       l2tpd = 0.69
-
-%if 0%{?suse_version} >= 1210
-BuildRequires:  systemd
-%{?systemd_requires}
-%define has_systemd 1
-%endif
+%{?systemd_ordering}
 
 %description
 xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
@@ -75,85 +67,63 @@
 Xl2tpd is based on the 0.69 L2TP by Jeff McAdams <[email protected]>
 It was de-facto maintained by Jacco de Leeuw <[email protected]> in 2002 and 2003.
 
-%package -n xl2tpd-doc
-Summary:        Documentation for xl2tpd package
-Group:          Documentation/Man
-
-%description -n xl2tpd-doc
-This package contains the documentation for using the xl2tpd daemon
-
 %prep
 %setup -q
-
 %patch0
 %patch1
 
 %build
-make DFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE $(getconf LFS_CFLAGS)" 
+make %{?_smp_mflags} DFLAGS="%{optflags} -D_GNU_SOURCE $(getconf LFS_CFLAGS)"
 
 %install
-export PREFIX=/usr
-make DESTDIR=%{buildroot} MANDIR=%{buildroot}/%{_mandir} install
+export PREFIX=%{_prefix}
+%make_install
 install -p -D -m644 examples/xl2tpd.conf 
%{buildroot}%{_sysconfdir}/xl2tpd/xl2tpd.conf
 install -p -d -m750 %{buildroot}%{_sysconfdir}/ppp
 install -p -D -m644 examples/ppp-options.xl2tpd 
%{buildroot}%{_sysconfdir}/ppp/options.xl2tpd
 install -p -D -m600 doc/l2tp-secrets.sample 
%{buildroot}%{_sysconfdir}/xl2tpd/l2tp-secrets
 install -p -D -m600 examples/chapsecrets.sample 
%{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample
 install -p -D -m755 -d %{buildroot}%{rundir}/xl2tpd  
-%if 0%{?has_systemd}
-install -D -m0644 %{S:1} %{buildroot}%{_unitdir}/%{name}.service
-install -D -m0644 %{S:2} %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf
-mkdir -p %{buildroot}/usr/lib/modules-load.d
-echo "l2tp_ppp" > %{buildroot}/usr/lib/modules-load.d/%{name}.conf
-ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
-%else
-install -p -D -m755 packaging/suse/xl2tpd.init %{buildroot}%{_initrddir}/xl2tpd
-ln -sf /etc/init.d/xl2tpd $RPM_BUILD_ROOT/%{_sbindir}/rcxl2tpd
-%endif
+install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
+install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
+%if 0%{?suse_version} > 1310
+sed -i 's|%{_localstatedir}/run/|/run/|' 
%{buildroot}%{_tmpfilesdir}/%{name}.conf
+%endif
+mkdir -p %{buildroot}%{_prefix}/lib/modules-load.d
+echo "l2tp_ppp" > %{buildroot}%{_prefix}/lib/modules-load.d/%{name}.conf
+ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
 
 %pre
-%if 0%{?has_systemd}
 %service_add_pre %{name}.service
-%endif
 
 %post
 # if we migrate from l2tpd to xl2tpd, copy the configs
-if [ -f /etc/l2tpd/l2tpd.conf ]
+if [ -f %{_sysconfdir}/l2tpd/l2tpd.conf ]
 then
-       echo "Old /etc/l2tpd configuration found, migrating to /etc/xl2tpd"
-       mv /etc/xl2tpd/xl2tpd.conf /etc/xl2tpd/xl2tpd.conf.rpmsave
-       cat /etc/l2tpd/l2tpd.conf | sed "s/options.l2tpd/options.xl2tpd/" > 
/etc/xl2tpd/xl2tpd.conf
-       mv /etc/ppp/options.xl2tpd /etc/ppp/options.xl2tpd.rpmsave
-       mv /etc/ppp/options.l2tpd /etc/ppp/options.xl2tpd
-       mv /etc/xl2tpd/l2tp-secrets /etc/xl2tpd/l2tpd-secrets.rpmsave
-       cp -pa /etc/l2tpd/l2tp-secrets /etc/xl2tpd/l2tp-secrets
+       echo "Old %{_sysconfdir}/l2tpd configuration found, migrating to 
%{_sysconfdir}/xl2tpd"
+       mv %{_sysconfdir}/xl2tpd/xl2tpd.conf 
%{_sysconfdir}/xl2tpd/xl2tpd.conf.rpmsave
+       cat %{_sysconfdir}/l2tpd/l2tpd.conf | sed 
"s/options.l2tpd/options.xl2tpd/" > %{_sysconfdir}/xl2tpd/xl2tpd.conf
+       mv %{_sysconfdir}/ppp/options.xl2tpd 
%{_sysconfdir}/ppp/options.xl2tpd.rpmsave
+       mv %{_sysconfdir}/ppp/options.l2tpd %{_sysconfdir}/ppp/options.xl2tpd
+       mv %{_sysconfdir}/xl2tpd/l2tp-secrets 
%{_sysconfdir}/xl2tpd/l2tpd-secrets.rpmsave
+       cp -pa %{_sysconfdir}/l2tpd/l2tp-secrets 
%{_sysconfdir}/xl2tpd/l2tp-secrets
 
 fi
 
-%if 0%{?has_systemd}
 %service_add_post %{name}.service
 %fillup_only
-%else
-%{fillup_and_insserv xl2tpd}
-%endif
+%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
 
 %preun
-%if 0%{?has_systemd}
 %service_del_preun %{name}.service
-%else
-%stop_on_removal xl2tpd
-%endif
 
 %postun
-%if 0%{?has_systemd}
 %service_del_postun %{name}.service
-%else
-%restart_on_update xl2tpd
-%insserv_cleanup
-%endif
 
 %files
-%defattr(-,root,root)
+%license LICENSE
+%doc BUGS CHANGES CREDITS README.* TODO
+%doc doc/README.patents examples/chapsecrets.sample
 %{_sbindir}/rcxl2tpd
 %{_sbindir}/xl2tpd
 %{_sbindir}/xl2tpd-control
@@ -162,19 +132,16 @@
 %config(noreplace) %{_sysconfdir}/xl2tpd/*
 %dir %{_sysconfdir}/ppp
 %config(noreplace) %{_sysconfdir}/ppp/*
-%ghost %{rundir}/xl2tpd
-%if 0%{?has_systemd}
-/usr/lib/tmpfiles.d/%{name}.conf
+%dir %ghost %{rundir}/xl2tpd
+%ghost %{rundir}/xl2tpd/l2tp-control
+%{_tmpfilesdir}/%{name}.conf
 %{_unitdir}/%{name}.service
-/usr/lib/modules-load.d/%{name}.conf
-%else
-%attr(0755,root,root)  %{_initrddir}/xl2tpd
-%endif
-
-%files -n xl2tpd-doc
-%defattr(-,root,root)
-%doc BUGS CHANGES CREDITS LICENSE README.* TODO 
-%doc doc/README.patents examples/chapsecrets.sample
-%{_mandir}/*/*
+%dir %{_prefix}/lib/modules-load.d
+%{_prefix}/lib/modules-load.d/%{name}.conf
+%{_mandir}/man1/pfc.1%{?ext_man}
+%{_mandir}/man5/l2tp-secrets.5%{?ext_man}
+%{_mandir}/man5/xl2tpd.conf.5%{?ext_man}
+%{_mandir}/man8/xl2tpd-control.8%{?ext_man}
+%{_mandir}/man8/xl2tpd.8%{?ext_man}
 
 %changelog

++++++ v1.3.10.tar.gz -> v1.3.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/CHANGES new/xl2tpd-1.3.13/CHANGES
--- old/xl2tpd-1.3.10/CHANGES   2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/CHANGES   2018-12-03 18:30:06.000000000 +0100
@@ -1,3 +1,33 @@
+v1.3.13 (December 3, 2018)
+* Specify email address for reporting security vulnerabilities [Samir Hussain]
+* Fix compile warning with USE_KERNEL in xl2tpd.c [Samir Hussain]
+* Applying patch that reduces compile warnings and fixes warnings from gcc and 
clang. [Gareth Ansell]
+* Fix compiler warnings in network.c [Gareth Ansell]
+* Add a make command for packaging's prep work [Samir Hussain]
+* Add Makefile directive for getting version [Samir Hussain]
+* Add a preproc for Watchguard firewall (Github issue #136) [daniel1111]
+* Convert from ISO-8859 to UTF-8 [Simon Deziel]
+* Update README to provide latest info on xl2tpd + Linux kernel 4.15+ [Samir 
Hussain]
+* Use dh_auto_build in order to allow cross compiles [Helmut Grohne]
+
+v1.3.12 (May 18, 2018)
+* TOS value to copy to the tunnel header (Yurkovskyy)
+* Fix for ENODEV (No such device) error with Linux kernel 4.15 (Douglas 
Kosovic)
+* Update xl2tpd.init (bogdik)
+* fix version number and upload (Samuel Thibault)
+* import wheezy changes  (Samuel Thibault)
+
+v1.3.11 (March 7, 2018)
+* Build packages for Xenial by default (Simon Deziel)
+* Bump d/compat to 9 (Simon Deziel)
+* Drop d/repack.sh script and refresh d/watch (Simon Deziel)
+* Refresh d/control by partly sync'ing from Debian (Simon Deziel)
+* Use HTTPS URL in d/copyright (Simon Deziel)
+
+v1.3.10.1 (November 16, 2017)
+* Have max retries as a configuration [Samir Hussain]
+* Add more into to "select timeout" debug message [Samir Hussain]
+
 v1.3.10 (August 2, 2017)
 * Update STRLEN in file.h to 100 (from 80) [Samir Hussain]
 * xl2tpd-control: fix xl2tpd hanged up in "fopen" [wendy2001011]
@@ -194,7 +224,7 @@
 v1.2.6
 * Partial fix for compiling on OpenBSD [synapse]
 * add missing setting of logopen=1 in init_log() [Shingo Yamawaki]
-* xltpd could deadlock on syslog() call in signal handler [Bart Trojanowski] 
+* xltpd could deadlock on syslog() call in signal handler [Bart Trojanowski]
 * fix fedora/centos spec file [Paul]
 
 v1.2.5
@@ -210,14 +240,14 @@
 * Workaround for broken kernels that send duplicate pids to waitpid()
   See: https://bugzilla.redhat.com/show_bug.cgi?id=486945 [Mika / Tuomo]
 * Fix pppd option from legacy -detach to nodetach [Tuomo]
-  
+
 v1.2.3
 * Fixes for prefix/destdir and spec files [paul/tuomo]
 * Use pcap not pcap-devel on suse, rhel and centos [paul/tuomo/shingo]
 * Added pfc to contrib. pfc is a tool to compile active-filters
   for pppd, which can be used for dial-on-demand filters [paul/roberto]
 * Bug tracker bugs fixed
-  # 998: xl2tpd-1.2.2 Makefile sets wrong path for mandir 
+  # 998: xl2tpd-1.2.2 Makefile sets wrong path for mandir
 
 v1.2.2
 * PPP CHAP authentication using plugin passwordfd.so failed [[email protected]]
@@ -240,7 +270,7 @@
 
 v1.1.12
 * Fix for dropped packets and wrong disconnects. [Ray Overland / Tuomo]
-* Included debian directory from Roberto C. Sanchez <[email protected]> 
+* Included debian directory from Roberto C. Sanchez <[email protected]>
 
 v1.1.11
 * Support for passwordfd when using xl2tpd as client.
@@ -318,7 +348,7 @@
 v1.00
 * First version managed by Xelerance, called xl2tpd.
 * If we aren't deamonized, then log to stderr.
-* added install: and DESTDIR support 
+* added install: and DESTDIR support
 
 0.70
 --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/Makefile new/xl2tpd-1.3.13/Makefile
--- old/xl2tpd-1.3.10/Makefile  2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/Makefile  2018-12-03 18:30:06.000000000 +0100
@@ -7,6 +7,9 @@
 # This is free software.  You may distribute it under
 # the terms of the GNU General Public License,
 # version 2, or at your option any later version.
+
+include Makefile.ver
+
 #
 # Note on debugging flags:
 # -DDEBUG_ZLB shows all ZLB exchange traffic
@@ -97,7 +100,7 @@
 
 IPFLAGS?= -DIP_ALLOCATION
 
-CFLAGS+= $(DFLAGS) -Os -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
+CFLAGS+= $(DFLAGS) -Os -Wall -Wextra -DSANITY $(OSFLAGS) $(IPFLAGS)
 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}
@@ -130,6 +133,15 @@
 romfs:
        $(ROMFSINST) /bin/$(EXEC)
 
+version:
+       @echo ${XL2TPDVERSION}
+
+packagingprep:
+       sed -i "s/XL2TPDVERSION=.*/XL2TPDVERSION=${XL2TPDBASEVERSION}/" 
Makefile.ver
+       sed -i "s/#define SERVER_VERSION .*/#define SERVER_VERSION 
\"xl2tpd-${XL2TPDBASEVERSION}\"/" l2tp.h
+       sed -i "s/Version: .*/Version: ${XL2TPDBASEVERSION}/" packaging/*/*.spec
+       sed -i "s/PKG_VERSION:=.*/PKG_VERSION:=${XL2TPDBASEVERSION}/" 
packaging/openwrt/Makefile
+
 install: ${EXEC} pfc ${CONTROL_EXEC}
        install -d -m 0755 ${SBINDIR}
        install -m 0755 $(EXEC) ${SBINDIR}/$(EXEC)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/Makefile.ver 
new/xl2tpd-1.3.13/Makefile.ver
--- old/xl2tpd-1.3.10/Makefile.ver      1970-01-01 01:00:00.000000000 +0100
+++ new/xl2tpd-1.3.13/Makefile.ver      2018-12-03 18:30:06.000000000 +0100
@@ -0,0 +1 @@
+XL2TPDVERSION=1.3.13
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/README.xl2tpd 
new/xl2tpd-1.3.13/README.xl2tpd
--- old/xl2tpd-1.3.10/README.xl2tpd     2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/README.xl2tpd     2018-12-03 18:30:06.000000000 +0100
@@ -1,6 +1,7 @@
 URL         : https://www.xelerance.com/software/xl2tpd/
 Summary     : Layer 2 Tunnelling Protocol Daemon (RFC 2661)
 Description :
+
 xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
 L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user
 sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP
@@ -12,7 +13,7 @@
 Example configuration files for such a setup are included in this RPM.
 
 xl2tpd works by opening a pseudo-tty for communicating with pppd.
-It runs completely in userspace but supports kernel mode L2TP. 
+It runs completely in userspace but supports kernel mode L2TP.
 
 xl2tpd supports IPsec SA Reference tracking to enable overlapping internak
 NAT'ed IP's by different clients (eg all clients connecting from their
@@ -26,6 +27,13 @@
 Xl2tpd is based on the 0.69 L2TP by Jeff McAdams <[email protected]>
 It was de-facto maintained by Jacco de Leeuw <[email protected]> in 2002 and 2003.
 
+NOTE: In Linux kernel 4.15+ there is a kernel bug with ancillary IP_PKTINFO.
+      As such, for Linux kernel 4.15+ we recommend the community use xl2tpd
+      1.3.12+
+
 Mailing Lists :
     https://lists.openswan.org/cgi-bin/mailman/listinfo/xl2tpd is home of the
     mailing list. Note: This is a closed list - you *must* be subscribed to 
post.
+
+Security Vulnerability :
+    Security vulnerabilities can be e-mailed to: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/avp.c new/xl2tpd-1.3.13/avp.c
--- old/xl2tpd-1.3.10/avp.c     2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/avp.c     2018-12-03 18:30:06.000000000 +0100
@@ -388,6 +388,8 @@
      * One option is to simply change the options we pass to pppd.
      *
      */
+    UNUSED(data);
+    UNUSED(datalen);
     if (gconfig.debug_avp)
     {
         if (DEBUG)
@@ -398,6 +400,7 @@
 
 int seq_reqd_avp (struct tunnel *t, struct call *c, void *data, int datalen)
 {
+    UNUSED(data);
 #ifdef SANITY
     if (t->sanity)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/call.c new/xl2tpd-1.3.13/call.c
--- old/xl2tpd-1.3.10/call.c    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/call.c    2018-12-03 18:30:06.000000000 +0100
@@ -577,6 +577,8 @@
 
 struct call *get_tunnel (int tunnel, unsigned int addr, int port)
 {
+    UNUSED(addr);
+    UNUSED(port);
     struct tunnel *st;
     if (tunnel)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/control.c new/xl2tpd-1.3.13/control.c
--- old/xl2tpd-1.3.10/control.c 2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/control.c 2018-12-03 18:30:06.000000000 +0100
@@ -90,7 +90,7 @@
 {
     _u16 fcs = PPP_INITFCS;
     unsigned char *c = buf->start;
-    int x;
+    size_t x;
     for (x = 0; x < buf->len; x++)
     {
         fcs = PPP_FCS (fcs, *c);
@@ -841,10 +841,12 @@
         add_frame_avp (buf, c->frame);
 /*             if (c->ourrws >= 0)
                        add_avp_rws(buf, c->ourrws); */
+#ifndef CONFIG_WATCHDOG_FIREWALL
         /* FIXME: Packet Processing Delay */
         /* We don't need any kind of proxy PPP stuff */
         /* Can we proxy authenticate ourselves??? */
         add_rxspeed_avp (buf, t->rxspeed);
+#endif
 /* add_seqreqd_avp (buf); *//* We don't have sequencing code, so
  * don't ask for sequencing */
         add_control_hdr (t, c, buf);
@@ -1312,7 +1314,7 @@
      * or not.  Returns 0 on success.
      */
 
-    int ehlen = MIN_PAYLOAD_HDR_LEN;
+    size_t ehlen = MIN_PAYLOAD_HDR_LEN;
     struct payload_hdr *h = (struct payload_hdr *) (buf->start);
     if (!c)
     {
@@ -1413,6 +1415,7 @@
 static inline int expand_payload (struct buffer *buf, struct tunnel *t,
                            struct call *c)
 {
+    UNUSED(t);
     /*
      * Expands payload header.  Does not check for valid header,
      * check_payload() should already be called as a prerequisite.
@@ -1597,7 +1600,7 @@
      * Write a packet, doing sync->async conversion if
      * necessary
      */
-    int x;
+    size_t x;
     unsigned char e;
     int err;
     static unsigned char wbuf[MAX_RECV_SIZE];
@@ -1627,17 +1630,17 @@
         /* We are given async frames, so write them
            directly to the tty */
         err = write (c->fd, buf->start, buf->len);
-        if (err == buf->len)
+        if ((size_t)err == buf->len)
         {
             return 0;
         }
-        else if (err == 0)
+        else if ((size_t)err == 0)
         {
             l2tp_log (LOG_WARNING, "%s: wrote no bytes of async packet\n",
                  __FUNCTION__);
             return -EINVAL;
         }
-        else if (err < 0)
+        else if ((size_t)err < 0)
         {
             if ((errno == EAGAIN) || (errno == EINTR))
             {
@@ -1649,13 +1652,13 @@
                      strerror (errno));
             }
         }
-        else if (err < buf->len)
+        else if ((size_t)err < buf->len)
         {
             l2tp_log (LOG_WARNING, "%s: short write (%d of %d bytes)\n", 
__FUNCTION__,
                  err, buf->len);
             return -EINVAL;
         }
-        else if (err > buf->len)
+        else if ((size_t)err > buf->len)
         {
             l2tp_log (LOG_WARNING, "%s: write returned LONGER than buffer 
length?\n",
                  __FUNCTION__);
@@ -1676,7 +1679,7 @@
     {
         // we must at least still have 3 bytes left in the worst case scenario:
         // 1 for a possible escape, 1 for the value and 1 to end the PPP 
stream.
-        if(pos >= (sizeof(wbuf) - 4)) {
+        if((size_t)pos >= (sizeof(wbuf) - 4)) {
             if(DEBUG)
                 l2tp_log(LOG_CRIT, "%s: rx packet is too big after PPP 
encoding (size %u, max is %u)\n",
                                 __FUNCTION__, buf->len, MAX_RECV_SIZE);
@@ -1702,7 +1705,7 @@
 #endif
 
     x = 0;
-    while ( pos != x )
+    while ((size_t) pos != x )
     {
       err = write (c->fd, wbuf+x, pos-x);
       if ( err < 0 ) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/changelog 
new/xl2tpd-1.3.13/debian/changelog
--- old/xl2tpd-1.3.10/debian/changelog  2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/changelog  2018-12-03 18:30:06.000000000 +0100
@@ -1,14 +1,198 @@
-xl2tpd (XL2TPDBASEVERSION-0xelerance1) trusty; urgency=low
+xl2tpd (1.3.12-1.1) UNRELEASED; urgency=medium
 
-  * Update to XL2TPDBASEVERSION
+  * Non-maintainer upload.
+  * Fix FTCFBS: Let dh_auto_build pass cross compilers to make. (Closes: #-1)
 
-  The real changelog is in /usr/share/doc/xl2tpd/changelog.gz
+ -- Helmut Grohne <[email protected]>  Thu, 24 May 2018 06:08:31 +0200
 
-  This package is NOT an official Debian/Ubuntu package. Please do
-  not file any Debian/Ubuntu bug reports for this package but contact
-  <[email protected]> if you have a problem.
+xl2tpd (1.3.12-1) unstable; urgency=medium
+  * New upstream release.
 
- -- Simon Deziel <[email protected]>  Tue, 08 Mar 2016 15:51:48 -0500
+ -- Samir Hussain <[email protected]>  Fri, 18 May 2018 17:08:21 -0500
+
+xl2tpd (1.3.11-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Use HTTPS URL in d/copyright
+  * Refresh d/control by partly sync'ing from Debian
+  * Drop d/repack.sh script and refresh d/watch
+  * Bump d/compat to 9
+  * Build packages for Xenial by default
+
+ -- Samir Hussain <[email protected]>  Wed, 07 Mar 2018 14:37:21 -0500
+
+xl2tpd (1.3.10-1) unstable; urgency=medium
+
+  * New upstream release.
+    - Drops the non-free RFC, so no need for +dfsg suffix any more.
+
+ -- Samuel Thibault <[email protected]>  Sun, 22 Oct 2017 19:26:04 +0200
+
+xl2tpd (1.3.8+dfsg-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Package adopted by Samir (Closes: #786810)
+  * control:
+    - Bump policy version (no change).
+    - Add missing lsb-base dependency.
+
+ -- Samuel Thibault <[email protected]>  Sun, 04 Dec 2016 21:17:35 +0100
+
+xl2tpd (1.3.6+dfsg-4) unstable; urgency=medium
+
+  * QA upload.
+  * rules: Enable USE_KERNEL, like upstream now does (Closes: #542521)
+
+ -- Samuel Thibault <[email protected]>  Fri, 27 Nov 2015 22:40:47 +0100
+
+xl2tpd (1.3.6+dfsg-3) unstable; urgency=low
+
+  * Orphan package, set maintainer to Debian QA Group
+
+ -- Roberto C. Sanchez <[email protected]>  Mon, 25 May 2015 14:40:47 -0400
+
+xl2tpd (1.3.6+dfsg-2) unstable; urgency=low
+
+  * Update to debhelper compatibility level 7
+  * Add patch series for local ip range option in the configuration, thanks
+    to Pete Morreale.
+
+ -- Roberto C. Sanchez <[email protected]>  Thu, 08 May 2014 11:57:42 -0400
+
+xl2tpd (1.3.6+dfsg-1) unstable; urgency=low
+
+  * New upstream release
+    + Drop Build-Depends on libssl-dev (reverted by upstream)
+  * Drop OpenSSL exception from debian/copyright (dropped by upstream)
+
+ -- Roberto C. Sanchez <[email protected]>  Wed, 15 Jan 2014 22:08:27 -0500
+
+xl2tpd (1.3.3+dfsg-1) unstable; urgency=low
+
+  * New upstream release (Closes: #680146, #635472, #693316)
+    + Now Build-Depends on libssl-dev for MD5 function
+  * Update debian/copyright with OpenSSL linking exception
+  * Update watch file to point to new github location
+  * Add Vcs-Browser and Vcs-Git tags to control file
+  * Update years in copyright file
+  * Update copyright to conform to copyright-format 1.0
+  * Update to Standards-Version 3.9.5 (no changes)
+  * Build with hardening options
+  * Drop obselete Replaces of l2tpd
+  * Drop 01_apply_build_flags_to_all_binaries.patch (incorporated upstream)
+
+ -- Roberto C. Sanchez <[email protected]>  Fri, 03 Jan 2014 17:50:43 -0500
+
+xl2tpd (1.3.1+dfsg-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Roberto C. Sanchez <[email protected]>  Mon, 10 Oct 2011 11:57:19 -0400
+
+xl2tpd (1.3.0+dfsg-1) unstable; urgency=low
+
+  * New upstream release (Closes: #611829)
+  * Update debian/watch to account for upstream's RC numbering
+  * Update to Standards-Version 3.9.2 (no changes)
+  * Start when service is stopped and restart is attempted (Closes: #631369)
+
+ -- Roberto C. Sanchez <[email protected]>  Tue, 13 Sep 2011 18:22:42 -0400
+
+xl2tpd (1.2.8+dfsg-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Roberto C. Sanchez <[email protected]>  Thu, 03 Mar 2011 13:31:28 -0500
+
+xl2tpd (1.2.7+dfsg-1) unstable; urgency=low
+
+  * New upstream release (Closes: #578070, #589306)
+  * Update to Standards-Version 3.9.1 (no changes)
+
+ -- Roberto C. Sanchez <[email protected]>  Sat, 07 Aug 2010 21:50:55 -0400
+
+xl2tpd (1.2.6+dfsg-1) unstable; urgency=low
+
+  * New upstream release
+  * Switch to dpkg-source 3.0 (quilt) format
+  * Update to Standards-Version 3.8.4 (no changes)
+  * Add $remote_fs to Required-Start/Required-Stop in init script
+
+ -- Roberto C. Sanchez <[email protected]>  Sat, 05 Jun 2010 21:10:17 -0400
+
+xl2tpd (1.2.5+dfsg-1) unstable; urgency=low
+
+  * New upstream release
+  * Remove unnecessary README.source since dpatch was dropped
+  * Update to Standards-Version 3.8.3
+
+ -- Roberto C. Sanchez <[email protected]>  Sun, 24 Jan 2010 15:23:17 -0500
+
+xl2tpd (1.2.4+dfsg-1) unstable; urgency=low
+
+  * New upstream release (Closes: #494795)
+  * Update to Standards-Version 3.8.1
+    + Add README.source
+    + Fix watch file to use dversionmangle instead of uversionmangle
+  * Update copyright file to new proposed format
+  * Drop debian/patches/02_trust_pppd_to_die.dpatch (included upstream)
+  * Add build-time dependency on libpcap0.8-dev
+  * Make lintian happy:
+    + Move creation of directory in /var/run to daemon start time
+  * Drop l2tpd transitional package
+
+ -- Roberto C. Sanchez <[email protected]>  Fri, 13 Mar 2009 09:58:54 -0400
+
+xl2tpd (1.2.0+dfsg-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/patches/01_fix_makefile_bashism.dpatch: Remove, included upstream
+
+ -- Roberto C. Sanchez <[email protected]>  Mon, 31 Mar 2008 17:02:47 -0400
+
+xl2tpd (1.1.12.dfsg.1-4) unstable; urgency=low
+
+  * Ship examples (Closes: #466512)
+  * Trust pppd to die properly (Closes: #466057)
+  * Update watch file and automate repacking upstream tarball.
+
+ -- Roberto C. Sanchez <[email protected]>  Sat, 08 Mar 2008 21:25:41 -0500
+
+xl2tpd (1.1.12.dfsg.1-3) unstable; urgency=low
+
+  * Update to Standards-Version 3.7.3 (no changes required)
+  * Fix Makefile bashism, thanks to Luca Falavigna (Closes: #453046)
+  * Make sure conffiles are not left behind (Closes: #455023)
+
+ -- Roberto C. Sanchez <[email protected]>  Sun, 20 Jan 2008 21:13:52 -0500
+
+xl2tpd (1.1.12.dfsg.1-2) unstable; urgency=low
+
+  * debian/control: Switch Homepage to be a proper control field.
+  * debian/xl2tpd.init: Add --oknodo for stop action (Closes: #447990)
+
+ -- Roberto C. Sanchez <[email protected]>  Sun,  4 Nov 2007 14:47:30 -0500
+
+xl2tpd (1.1.12.dfsg.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Repack upsteam tarball: remove non-free RFC and shipped debian/ directory
+
+ -- Roberto C. Sanchez <[email protected]>  Sat, 20 Oct 2007 09:46:16 -0400
+
+xl2tpd (1.1.11.dfsg.1-2) unstable; urgency=low
+
+  * Added missing copyright notices.
+
+ -- Roberto C. Sanchez <[email protected]>  Fri,  3 Aug 2007 14:13:23 -0400
+
+xl2tpd (1.1.11.dfsg.1-1) unstable; urgency=low
+
+  * Initial release (Closes: #427113, 402660)
+  * Make l2tpd obsolete (Closes: #358799)
+  * Repackage upstream tarball to remove non-free RFC (Closes: #393381)
+
+ -- Roberto C. Sanchez <[email protected]>  Tue, 31 Jul 2007 20:57:23 -0400
 
 Local variables:
 mode: debian-changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/compat 
new/xl2tpd-1.3.13/debian/compat
--- old/xl2tpd-1.3.10/debian/compat     2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/compat     2018-12-03 18:30:06.000000000 +0100
@@ -1 +1 @@
-7
+10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/control 
new/xl2tpd-1.3.13/debian/control
--- old/xl2tpd-1.3.10/debian/control    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/control    2018-12-03 18:30:06.000000000 +0100
@@ -1,17 +1,18 @@
 Source: xl2tpd
 Section: net
 Priority: optional
-Maintainer: Simon Deziel <[email protected]>
+Maintainer: Samir Hussain <[email protected]>
+Uploaders: Samuel Thibault <[email protected]>
 Homepage: https://www.xelerance.com/software/xl2tpd/
 Vcs-Browser: https://github.com/xelerance/xl2tpd
 Vcs-Git: git://github.com/xelerance/xl2tpd.git
-Build-Depends: debhelper (>= 7.0.8), libpcap0.8-dev
-Standards-Version: 3.9.5
+Build-Depends: debhelper (>= 10), libpcap0.8-dev
+Standards-Version: 3.9.8
 
 Package: xl2tpd
 Architecture: any
 Provides: l2tpd
-Depends: ${shlibs:Depends}, ${misc:Depends}, ppp
+Depends: ${shlibs:Depends}, ${misc:Depends}, ppp, lsb-base (>= 3.0-6)
 Description: layer 2 tunneling protocol implementation
  xl2tpd is an open source implementation of the L2TP tunneling
  protocol (RFC2661).  xl2tpd is forked from l2tpd and is maintained by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/copyright 
new/xl2tpd-1.3.13/debian/copyright
--- old/xl2tpd-1.3.10/debian/copyright  2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/copyright  2018-12-03 18:30:06.000000000 +0100
@@ -1,18 +1,18 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Source: https://github.com/xelerance/xl2tpd
+Source: http://www.xelerance.com/software/xl2tpd/ (repacked to remove non-free 
RFC text included in upstream distribution)
 
 Files: *
 Copyright: (c) 2006-2016 Xelerance Corporation
 License: GPL-2+
- Please see the CREDITS file for a complete copyright history of all parts of
- the project.
- .
- On Debian systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL-2'.
 
 Files: debian/*
 Copyright: (c) 2007-2013 Roberto C. Sanchez <[email protected]>
+                         Jean-Francois Dive
 License: GPL-2+
- The packaging is based on the packaging of the original l2tpd package by
- Jean-Francois Dive.
 
+License: GPL-2+
+ Please see the CREDITS file for a complete copyright history of all parts of
+ the project.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-2'.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/repack.sh 
new/xl2tpd-1.3.13/debian/repack.sh
--- old/xl2tpd-1.3.10/debian/repack.sh  2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/repack.sh  2018-12-03 18:30:06.000000000 +0100
@@ -28,6 +28,7 @@
 
     cd $DIR
 
+    rm -v $UP_DIR/doc/rfc2661.txt
     rm -rv $UP_DIR/debian/
 
     REPACK_DIR="$PKG-$VER.orig"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/rules 
new/xl2tpd-1.3.13/debian/rules
--- old/xl2tpd-1.3.10/debian/rules      2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/rules      2018-12-03 18:30:06.000000000 +0100
@@ -27,7 +27,7 @@
 build-indep: build-stamp
 build-stamp: configure-stamp 
        dh_testdir
-       $(MAKE) CFLAGS=" -DDEBUG_PPPD -DTRUST_PPPD_TO_DIE -O2 -fno-builtin 
-Wall -DSANITY -DLINUX -I$(KERNELSRC)/include/ -DIP_ALLOCATION -DUSE_KERNEL 
$(shell dpkg-buildflags --get CFLAGS)" CPPFLAGS=" -DDEBUG_PPPD 
-DTRUST_PPPD_TO_DIE -O2 -fno-builtin -Wall -DSANITY -DLINUX 
-I$(KERNELSRC)/include/ -DIP_ALLOCATION $(shell dpkg-buildflags --get 
CPPFLAGS)" LDFLAGS=" $(shell dpkg-buildflags --get LDFLAGS)"
+       dh_auto_build -- CFLAGS=" -DDEBUG_PPPD -DTRUST_PPPD_TO_DIE -O2 
-fno-builtin -Wall -DSANITY -DLINUX -I$(KERNELSRC)/include/ -DIP_ALLOCATION 
-DUSE_KERNEL $(shell dpkg-buildflags --get CFLAGS)" CPPFLAGS=" -DDEBUG_PPPD 
-DTRUST_PPPD_TO_DIE -O2 -fno-builtin -Wall -DSANITY -DLINUX 
-I$(KERNELSRC)/include/ -DIP_ALLOCATION $(shell dpkg-buildflags --get 
CPPFLAGS)" LDFLAGS=" $(shell dpkg-buildflags --get LDFLAGS)"
        touch $@
 
 clean:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/source/options 
new/xl2tpd-1.3.13/debian/source/options
--- old/xl2tpd-1.3.10/debian/source/options     1970-01-01 01:00:00.000000000 
+0100
+++ new/xl2tpd-1.3.13/debian/source/options     2018-12-03 18:30:06.000000000 
+0100
@@ -0,0 +1,2 @@
+--diff-ignore
+--tar-ignore
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/debian/watch 
new/xl2tpd-1.3.13/debian/watch
--- old/xl2tpd-1.3.10/debian/watch      2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/debian/watch      2018-12-03 18:30:06.000000000 +0100
@@ -1,9 +1,3 @@
-# The uversionmangle option separates consecutive digits in the version string
-# with a period.  The reason for this is that in the past, upstream used
-# version numbers like 1.00, 1.00, and 1.1.08.  For some time now they have
-# switched to a more "standard" 1.2.8, 1.3.0, 1.3.1, and so forth, versioning
-# scheme.
-
-version=3
-opts="dversionmangle=s/\+dfsg//,uversionmangle=s/(\d)(\d)/\1\.\2/g" 
https://github.com/xelerance/xl2tpd/tags 
.*/v?(\d[\d\.]+)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) debian debian/repack.sh
-
+version=4
+opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/xl2tpd-$1\.tar\.gz/ \
+  https://github.com/xelerance/xl2tpd/tags .*/v?(\d\S+)\.tar\.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/doc/l2tpd-RPM.README 
new/xl2tpd-1.3.13/doc/l2tpd-RPM.README
--- old/xl2tpd-1.3.10/doc/l2tpd-RPM.README      2017-08-02 19:46:06.000000000 
+0200
+++ new/xl2tpd-1.3.13/doc/l2tpd-RPM.README      2018-12-03 18:30:06.000000000 
+0100
@@ -3,7 +3,7 @@
 """""""""
 
 This l2tpd RPM was originally created by Lenny Cartier
-<[email protected]> and Per �yvind Karlsen <[email protected]>.
+<[email protected]> and Per Øyvind Karlsen <[email protected]>.
 Some details have been changed by me (see specfile changelog).
 Originally it only built on recent versions of Mandrake but it
 should now work on Red Hat, SuSE and older Mandrake versions as well.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/doc/xl2tpd.conf.5 
new/xl2tpd-1.3.13/doc/xl2tpd.conf.5
--- old/xl2tpd-1.3.10/doc/xl2tpd.conf.5 2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/doc/xl2tpd.conf.5 2018-12-03 18:30:06.000000000 +0100
@@ -76,6 +76,11 @@
 .B debug tunnel
 Set this to yes to enable syslog output of tunnel debugging information.
 
+.TP
+.B max retries
+Specify how many retries before a tunnel is closed. If there is no
+tunnel, then stop re-transmitting. The default is 5.
+
 .SH "LNS SECTION"
 .TP 
 .B exclusive
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/file.c new/xl2tpd-1.3.13/file.c
--- old/xl2tpd-1.3.10/file.c    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/file.c    2018-12-03 18:30:06.000000000 +0100
@@ -42,12 +42,15 @@
 
     gconfig.port = UDP_LISTEN_PORT;
     gconfig.sarefnum = IP_IPSEC_REFINFO; /* default use the latest we know */
+    gconfig.ipsecsaref = 0; /* default off - requires patched KLIPS kernel 
module */
+    gconfig.forceuserspace = 0; /* default off - allow kernel decap of data 
packets */
     gconfig.listenaddr = htonl(INADDR_ANY); /* Default is to bind (listen) to 
all interfaces */
     gconfig.debug_avp = 0;
     gconfig.debug_network = 0;
     gconfig.packet_dump = 0;
     gconfig.debug_tunnel = 0;
     gconfig.debug_state = 0;
+    gconfig.max_retries = DEFAULT_MAX_RETRIES;
     lnslist = NULL;
     laclist = NULL;
     deflac = (struct lac *) calloc (1, sizeof (struct lac));
@@ -214,6 +217,7 @@
 
 int set_string (char *word, char *value, char *ptr, int len)
 {
+    UNUSED(word);
 #ifdef DEBUG_FILE
     l2tp_log (LOG_DEBUG, "set_%s: %s  flag to '%s'\n", word, word, value);
 #endif /* ; */
@@ -351,6 +355,26 @@
     return 0;
 }
 
+int set_maxretries (char *word, char *value, int context, void *item)
+{
+    switch (context & ~CONTEXT_DEFAULT)
+    {
+    case CONTEXT_GLOBAL:
+#ifdef DEBUG_FILE
+        l2tp_log (LOG_DEBUG, "set_port: Setting global max retries to %s\n",
+             value);
+#endif
+        set_int (word, value, &(((struct global *) item)->max_retries));
+        break;
+    default:
+        snprintf (filerr, sizeof (filerr), "'%s' not valid in this context\n",
+                  word);
+        return -1;
+    }
+    return 0;
+
+}
+
 int set_rmax (char *word, char *value, int context, void *item)
 {
     if (atoi (value) < 1)
@@ -907,7 +931,7 @@
                                }
                        }
                        /* Copy the last field + null terminator */
-                       if (ip_hi + sizeof(ip_hi)-e > strlen(d)) {
+                       if ((size_t)(ip_hi + sizeof(ip_hi)-e) > strlen(d)) {
                                strcpy(e, d);
                                d = ip_hi;
                        }
@@ -1035,6 +1059,7 @@
 
 int set_ip (char *word, char *value, unsigned int *addr)
 {
+    UNUSED(word);
     struct hostent *hp;
     hp = gethostbyname (value);
     if (!hp)
@@ -1221,6 +1246,7 @@
 
 int set_rand_egd (char *value)
 {
+    UNUSED(value);
     l2tp_log(LOG_WARNING, "%s: not yet implemented!\n", __FUNCTION__);
     rand_source = RAND_EGD;
     return -1;
@@ -1228,6 +1254,7 @@
 
 int set_rand_source (char *word, char *value, int context, void *item)
 {
+    UNUSED(item);
     time_t seconds;
     /*
      * We're going to go ahead and seed the rand() function with srand()
@@ -1571,5 +1598,6 @@
     {"tx bps", &set_speed},
     {"rx bps", &set_speed},
     {"bps", &set_speed},
+    {"max retries" , &set_maxretries},
     {NULL, NULL}
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/file.h new/xl2tpd-1.3.13/file.h
--- old/xl2tpd-1.3.10/file.h    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/file.h    2018-12-03 18:30:06.000000000 +0100
@@ -145,12 +145,14 @@
 {
     unsigned int listenaddr;    /* IP address to bind to */ 
     int port;                   /* Port number to listen to */
+
     char authfile[STRLEN];      /* File containing authentication info */
     char altauthfile[STRLEN];   /* File containing authentication info */
     char configfile[STRLEN];    /* File containing configuration info */
     char altconfigfile[STRLEN]; /* File containing configuration info */
     char pidfile[STRLEN];       /* File containing the pid number*/
     char controlfile[STRLEN];   /* Control file name (named pipe) */
+    char controltos[STRLEN];    /* Control TOS value */
     int daemon;                 /* Use daemon mode? */
     int syslog;                 /* Use syslog for logging? */
     int accesscontrol;          /* Use access control? */
@@ -164,6 +166,8 @@
     int sarefnum;              /* Value of IPSEC_REFINFO used by kernel
                                 * (we used to pick 22, but 2.6.36+ took that, 
so now we pick 30)
                                 * Changed in SAref patch in openswan 2.6.36 
for linux 2.6.36+ */
+    int max_retries;            /* Max retries before closing tunnel
+                                   or stop re-transmitting */
 };
 
 extern struct global gconfig;   /* Global configuration options */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/l2tp.h new/xl2tpd-1.3.13/l2tp.h
--- old/xl2tpd-1.3.10/l2tp.h    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/l2tp.h    2018-12-03 18:30:06.000000000 +0100
@@ -41,6 +41,7 @@
 
 #define CONTROL_PIPE "/var/run/xl2tpd/l2tp-control"
 #define CONTROL_PIPE_MESSAGE_SIZE 1024
+#define UNUSED(x) (void)(x)
 
 /* Control pip request types */
 #define CONTROL_PIPE_REQ_LAC_REMOVE 'r'
@@ -58,7 +59,7 @@
 #define CONTROL_PIPE_REQ_LNS_REMOVE 'w'     /* Get status of LNS */
 
 #define BINARY "xl2tpd"
-#define SERVER_VERSION "xl2tpd-1.3.10"
+#define SERVER_VERSION "xl2tpd-1.3.13"
 #define VENDOR_NAME "xelerance.com"
 #ifndef PPPD
 #define PPPD           "/usr/sbin/pppd"
@@ -82,7 +83,7 @@
 #define CLBIT(ver) (ver & 0x4000)       /* Length bit present.  Must be 1
                                            for control messages */
 
-#define CZBITS(ver) (ver &0x37F8)       /* Reserved bits:  We must drop 
+#define CZBITS(ver) (ver &0x37F8)       /* Reserved bits:  We must drop
                                            anything with these there */
 
 #define CFBIT(ver) (ver & 0x0800)       /* Presence of Ns and Nr fields
@@ -111,12 +112,12 @@
                                    so we can "decompress" the
                                    payloads and simplify coding */
 #if 1
-#define DEFAULT_MAX_RETRIES 5    /* Recommended value from spec */
+#define DEFAULT_MAX_RETRIES 5   /* Recommended value from spec */
 #else
 #define DEFAULT_MAX_RETRIES 95   /* give us more time to debug */
 #endif
 
-#define DEFAULT_RWS_SIZE   4    /* Default max outstanding 
+#define DEFAULT_RWS_SIZE   4    /* Default max outstanding
                                    control packets in queue */
 #define DEFAULT_TX_BPS         10000000        /* For outgoing calls, report 
this speed */
 #define DEFAULT_RX_BPS         10000000
@@ -251,7 +252,7 @@
 #endif
 
 
-/* 
+/*
  * This is just some stuff to take
  * care of kernel definitions
  */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/misc.c new/xl2tpd-1.3.13/misc.c
--- old/xl2tpd-1.3.10/misc.c    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/misc.c    2018-12-03 18:30:06.000000000 +0100
@@ -39,6 +39,8 @@
     --syslog_nesting;               \
 } while(0)
 
+#define UNUSED(x) (void)(x)
+
 void init_log()
 {
     static int logopen=0;
@@ -150,7 +152,7 @@
 
 void do_packet_dump (struct buffer *buf)
 {
-    int x;
+    size_t x;
     unsigned char *c = buf->start;
     printf ("packet dump: \nHEX: { ");
     for (x = 0; x < buf->len; x++)
@@ -260,6 +262,8 @@
 
 int get_egd_entropy(char *buf, int count)
 {
+    UNUSED(buf);
+    UNUSED(count);
     return -1;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/misc.h new/xl2tpd-1.3.13/misc.h
--- old/xl2tpd-1.3.10/misc.h    2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/misc.h    2018-12-03 18:30:06.000000000 +0100
@@ -24,8 +24,8 @@
     void *rstart;
     void *rend;
     void *start;
-    int len;
-    int maxlen;
+    size_t len;
+    size_t maxlen;
 #if 0
     unsigned int addr;
     int port;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/network.c new/xl2tpd-1.3.13/network.c
--- old/xl2tpd-1.3.10/network.c 2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/network.c 2018-12-03 18:30:06.000000000 +0100
@@ -78,23 +78,27 @@
      * For L2TP/IPsec with KLIPSng, set the socket to receive IPsec REFINFO
      * values.
      */
-    arg=1;
-    if(setsockopt(server_socket, IPPROTO_IP, gconfig.sarefnum,
-                 &arg, sizeof(arg)) != 0) {
-           l2tp_log(LOG_CRIT, "setsockopt recvref[%d]: %s\n", 
gconfig.sarefnum, strerror(errno));
-
-           gconfig.ipsecsaref=0;
-    }
-
-    arg=1;
-    if(setsockopt(server_socket, IPPROTO_IP, IP_PKTINFO, (char*)&arg, 
sizeof(arg)) != 0) {
-           l2tp_log(LOG_CRIT, "setsockopt IP_PKTINFO: %s\n", strerror(errno));
+    if (!gconfig.ipsecsaref)
+    {
+        l2tp_log (LOG_INFO, "Not looking for kernel SAref support.\n");
     }
-#else
+    else
     {
-       l2tp_log(LOG_INFO, "No attempt being made to use IPsec SAref's since 
we're not on a Linux machine.\n");
+        arg=1;
+        if(setsockopt(server_socket, IPPROTO_IP, gconfig.sarefnum,  &arg, 
sizeof(arg)) != 0) {
+            l2tp_log(LOG_CRIT, "setsockopt recvref[%d]: %s\n", 
gconfig.sarefnum, strerror(errno));
+            gconfig.ipsecsaref=0;
+        }
+        else
+        {
+            arg=1;
+            if(setsockopt(server_socket, IPPROTO_IP, IP_PKTINFO, (char*)&arg, 
sizeof(arg)) != 0) {
+                l2tp_log(LOG_CRIT, "setsockopt IP_PKTINFO: %s\n", 
strerror(errno));
+            }
+        }
     }
-
+#else
+    l2tp_log(LOG_INFO, "No attempt being made to use IPsec SAref's since we're 
not on a Linux machine.\n");
 #endif
 
 #ifdef USE_KERNEL
@@ -179,6 +183,7 @@
 
 void dethrottle (void *call)
 {
+    UNUSED(call);
 /*     struct call *c = (struct call *)call; */
 /*     if (c->throttle) {
 #ifdef DEBUG_FLOW
@@ -226,7 +231,7 @@
             return;
         }
     }
-    if (buf->retries > DEFAULT_MAX_RETRIES)
+    if (buf->retries > gconfig.max_retries)
     {
         /*
            * Too many retries.  Either kill the tunnel, or
@@ -270,6 +275,20 @@
     }
 }
 
+unsigned char* get_inner_tos_byte (struct buffer *buf)
+{
+       int tos_offset = 10;
+       unsigned char *tos_byte = buf->start+tos_offset;
+       return tos_byte;
+}
+
+unsigned char* get_inner_ppp_type (struct buffer *buf)
+{
+       int ppp_type_offset = 8;
+       unsigned char *ppp_type_byte = buf->start+ppp_type_offset;
+       return ppp_type_byte;
+}
+
 void udp_xmit (struct buffer *buf, struct tunnel *t)
 {
     struct cmsghdr *cmsg = NULL;
@@ -462,7 +481,9 @@
             {
                 if (gconfig.debug_network)
                 {
-                    l2tp_log (LOG_DEBUG, "%s: select timeout\n", __FUNCTION__);
+                    l2tp_log (LOG_DEBUG,
+                        "%s: select timeout with max retries: %d for tunnel: 
%d\n",
+                        __FUNCTION__, gconfig.max_retries, 
tunnels.head->ourtid);
                 }
             }
             else
@@ -681,6 +702,17 @@
                         }
                         sc->tx_bytes += sc->ppp_buf->len;
                         sc->tx_pkts++;
+
+                        unsigned char* tosval = 
get_inner_tos_byte(sc->ppp_buf);
+                        unsigned char* typeval = 
get_inner_ppp_type(sc->ppp_buf);
+
+                        int tosval_dec = (int)*tosval;
+                        int typeval_dec = (int)*typeval;
+
+                        if (typeval_dec != 33 )
+                               tosval_dec=atoi(gconfig.controltos);
+                        setsockopt(server_socket, IPPROTO_IP, IP_TOS, 
&tosval_dec, sizeof(tosval_dec));
+
                         udp_xmit (sc->ppp_buf, st);
                         recycle_payload (sc->ppp_buf, sc->container->peer);
                     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/packaging/fedora/xl2tpd.init 
new/xl2tpd-1.3.13/packaging/fedora/xl2tpd.init
--- old/xl2tpd-1.3.10/packaging/fedora/xl2tpd.init      2017-08-02 
19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/packaging/fedora/xl2tpd.init      2018-12-03 
18:30:06.000000000 +0100
@@ -21,19 +21,31 @@
 
 #Servicename
 SERVICE=xl2tpd
-
+PATHTOSERV=/usr/sbin/
 # Source function library.
 . /etc/rc.d/init.d/functions
 
 # Source networking configuration.
 . /etc/sysconfig/network
 
-if [ ${NETWORKING} = "no" ]
+if [ "${NETWORKING}" = "no" ]
 then
+       echo -n "No Networking"
        exit 0
 fi
 
-[ -x /usr/sbin/$SERVICE ] || exit 0
+if [ ! -x $PATHTOSERV$SERVICE ]
+then
+       echo -n "No bin $SERVICE found, try to find auto"
+       SERVICE=$(find / -name $SERVICE | grep bin)
+       if [ ! -x $SERVICE ] 
+       then
+               echo -n "No bin $SERVICE auto found, please check this"
+               exit 0
+       fi
+else
+       SERVICE=$PATHTOSERV$SERVICE
+fi
 
 RETVAL=0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/packaging/fedora/xl2tpd.spec 
new/xl2tpd-1.3.13/packaging/fedora/xl2tpd.spec
--- old/xl2tpd-1.3.10/packaging/fedora/xl2tpd.spec      2017-08-02 
19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/packaging/fedora/xl2tpd.spec      2018-12-03 
18:30:06.000000000 +0100
@@ -1,13 +1,13 @@
 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
 Name: xl2tpd
-Version: 1.3.10
+Version: 1.3.13
 Release: 1%{?dist}
 License: GPLv2
 Url: http://www.xelerance.com/software/xl2tpd/
 Group: System Environment/Daemons
 Source0: https://github.com/xelerance/xl2tpd/archive/v%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: ppp 
+Requires: ppp
 BuildRequires: kernel-headers => 2.6.23
 %if 0%{?el3}%{?el4}
 BuildRequires: libpcap
@@ -80,7 +80,7 @@
        mv /etc/ppp/options.l2tpd /etc/ppp/options.xl2tpd
        mv /etc/xl2tpd/l2tp-secrets /etc/xl2tpd/l2tpd-secrets.rpmsave
        cp -pa /etc/l2tpd/l2tp-secrets /etc/xl2tpd/l2tp-secrets
-       
+
 fi
 
 
@@ -168,10 +168,10 @@
 
 * Sat Jun 4 2005 Jacco de Leeuw <[email protected]>
 - l2tpd.org has been hijacked. Project moved back to SourceForge:
-  http://l2tpd.sourceforge.net 
+  http://l2tpd.sourceforge.net
 
 * Tue May 3 2005 Jacco de Leeuw <[email protected]>
-- Small Makefile fixes. Explicitly use gcc instead of cc. 
+- Small Makefile fixes. Explicitly use gcc instead of cc.
   Network services library was not linked on Solaris due to typo.
 
 * Thu Mar 17 2005 Jacco de Leeuw <[email protected]> 0.69-11jdl
@@ -180,7 +180,7 @@
 
 * Fri Feb 4 2005 Jacco de Leeuw <[email protected]>
 - Added code from Roaring Penguin (rp-l2tp) to support SysV-style ptys.
-  Requires the N_HDLC kernel module. 
+  Requires the N_HDLC kernel module.
 
 * Fri Nov 26 2004 Jacco de Leeuw <[email protected]>
 - Updated the README.
@@ -236,7 +236,7 @@
 - Renamed the example Openswan .conf files to better reflect
   the situation. There are two variants using different portselectors.
   Previously I thought Windows 2000/XP used portselector 17/0
-  and the rest used 17/1701. But with the release of an updated 
+  and the rest used 17/1701. But with the release of an updated
   IPsec client by Microsoft, it turns out that 17/0 must have
   been a mistake: the updated client now also uses 17/1701.
 
@@ -250,7 +250,7 @@
 
 * Thu Mar 6 2003 Jacco de Leeuw <[email protected]> 0.69-5jdl
 - Replaced Dominique's patch by Damion de Soto's, which does not
-  depend on the N_HDLC kernel module. 
+  depend on the N_HDLC kernel module.
 
 * Wed Feb 26 2003 Jacco de Leeuw <[email protected]> 0.69-4jdl
 - Seperate example config files for Win9x (MSL2TP) and Win2K/XP
@@ -284,7 +284,7 @@
 - Specfile adapted from Mandrake Cooker. The original RPM can be
   retrieved through:
   http://www.rpmfind.net/linux/rpm2html/search.php?query=l2tpd
-- Config path changed from /etc/l2tp/ to /etc/l2tpd/ 
+- Config path changed from /etc/l2tp/ to /etc/l2tpd/
   (Seems more logical and rp-l2tp already uses /etc/l2tp/).
 - Do not run at boot or install. The original RPM uses a config file
   which is completely commented out, but it still starts l2tpd on all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/packaging/openwrt/Makefile 
new/xl2tpd-1.3.13/packaging/openwrt/Makefile
--- old/xl2tpd-1.3.10/packaging/openwrt/Makefile        2017-08-02 
19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/packaging/openwrt/Makefile        2018-12-03 
18:30:06.000000000 +0100
@@ -2,7 +2,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xl2tpd
-PKG_VERSION:=1.3.10
+PKG_VERSION:=1.3.13
 PKG_RELEASE:=1
 PKG_MD5SUM:=ab5656eb5a3d1973f7f69b039675332e-NEEDSUPDATING
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/packaging/suse/sles10.spec 
new/xl2tpd-1.3.13/packaging/suse/sles10.spec
--- old/xl2tpd-1.3.10/packaging/suse/sles10.spec        2017-08-02 
19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/packaging/suse/sles10.spec        2018-12-03 
18:30:06.000000000 +0100
@@ -1,6 +1,6 @@
 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
 Name: xl2tpd
-Version: 1.3.10
+Version: 1.3.13
 Release: 1%{?dist}
 License: GPLv2
 Url: http://www.xelerance.com/software/xl2tpd/
@@ -73,7 +73,7 @@
        mv /etc/ppp/options.l2tpd /etc/ppp/options.xl2tpd
        mv /etc/xl2tpd/l2tp-secrets /etc/xl2tpd/l2tpd-secrets.rpmsave
        cp -pa /etc/l2tpd/l2tp-secrets /etc/xl2tpd/l2tp-secrets
-       
+
 fi
 
 
@@ -162,10 +162,10 @@
 
 * Sat Jun 4 2005 Jacco de Leeuw <[email protected]>
 - l2tpd.org has been hijacked. Project moved back to SourceForge:
-  http://l2tpd.sourceforge.net 
+  http://l2tpd.sourceforge.net
 
 * Tue May 3 2005 Jacco de Leeuw <[email protected]>
-- Small Makefile fixes. Explicitly use gcc instead of cc. 
+- Small Makefile fixes. Explicitly use gcc instead of cc.
   Network services library was not linked on Solaris due to typo.
 
 * Thu Mar 17 2005 Jacco de Leeuw <[email protected]> 0.69-11jdl
@@ -174,7 +174,7 @@
 
 * Fri Feb 4 2005 Jacco de Leeuw <[email protected]>
 - Added code from Roaring Penguin (rp-l2tp) to support SysV-style ptys.
-  Requires the N_HDLC kernel module. 
+  Requires the N_HDLC kernel module.
 
 * Fri Nov 26 2004 Jacco de Leeuw <[email protected]>
 - Updated the README.
@@ -230,7 +230,7 @@
 - Renamed the example Openswan .conf files to better reflect
   the situation. There are two variants using different portselectors.
   Previously I thought Windows 2000/XP used portselector 17/0
-  and the rest used 17/1701. But with the release of an updated 
+  and the rest used 17/1701. But with the release of an updated
   IPsec client by Microsoft, it turns out that 17/0 must have
   been a mistake: the updated client now also uses 17/1701.
 
@@ -244,7 +244,7 @@
 
 * Thu Mar 6 2003 Jacco de Leeuw <[email protected]> 0.69-5jdl
 - Replaced Dominique's patch by Damion de Soto's, which does not
-  depend on the N_HDLC kernel module. 
+  depend on the N_HDLC kernel module.
 
 * Wed Feb 26 2003 Jacco de Leeuw <[email protected]> 0.69-4jdl
 - Seperate example config files for Win9x (MSL2TP) and Win2K/XP
@@ -278,7 +278,7 @@
 - Specfile adapted from Mandrake Cooker. The original RPM can be
   retrieved through:
   http://www.rpmfind.net/linux/rpm2html/search.php?query=l2tpd
-- Config path changed from /etc/l2tp/ to /etc/l2tpd/ 
+- Config path changed from /etc/l2tp/ to /etc/l2tpd/
   (Seems more logical and rp-l2tp already uses /etc/l2tp/).
 - Do not run at boot or install. The original RPM uses a config file
   which is completely commented out, but it still starts l2tpd on all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/packaging/suse/xl2tpd.spec 
new/xl2tpd-1.3.13/packaging/suse/xl2tpd.spec
--- old/xl2tpd-1.3.10/packaging/suse/xl2tpd.spec        2017-08-02 
19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/packaging/suse/xl2tpd.spec        2018-12-03 
18:30:06.000000000 +0100
@@ -1,6 +1,6 @@
 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
 Name: xl2tpd
-Version: 1.3.10
+Version: 1.3.13
 Release: 1%{?dist}
 License: GPLv2
 Url: http://www.xelerance.com/software/xl2tpd/
@@ -73,7 +73,7 @@
        mv /etc/ppp/options.l2tpd /etc/ppp/options.xl2tpd
        mv /etc/xl2tpd/l2tp-secrets /etc/xl2tpd/l2tpd-secrets.rpmsave
        cp -pa /etc/l2tpd/l2tp-secrets /etc/xl2tpd/l2tp-secrets
-       
+
 fi
 
 
@@ -162,10 +162,10 @@
 
 * Sat Jun 4 2005 Jacco de Leeuw <[email protected]>
 - l2tpd.org has been hijacked. Project moved back to SourceForge:
-  http://l2tpd.sourceforge.net 
+  http://l2tpd.sourceforge.net
 
 * Tue May 3 2005 Jacco de Leeuw <[email protected]>
-- Small Makefile fixes. Explicitly use gcc instead of cc. 
+- Small Makefile fixes. Explicitly use gcc instead of cc.
   Network services library was not linked on Solaris due to typo.
 
 * Thu Mar 17 2005 Jacco de Leeuw <[email protected]> 0.69-11jdl
@@ -174,7 +174,7 @@
 
 * Fri Feb 4 2005 Jacco de Leeuw <[email protected]>
 - Added code from Roaring Penguin (rp-l2tp) to support SysV-style ptys.
-  Requires the N_HDLC kernel module. 
+  Requires the N_HDLC kernel module.
 
 * Fri Nov 26 2004 Jacco de Leeuw <[email protected]>
 - Updated the README.
@@ -230,7 +230,7 @@
 - Renamed the example Openswan .conf files to better reflect
   the situation. There are two variants using different portselectors.
   Previously I thought Windows 2000/XP used portselector 17/0
-  and the rest used 17/1701. But with the release of an updated 
+  and the rest used 17/1701. But with the release of an updated
   IPsec client by Microsoft, it turns out that 17/0 must have
   been a mistake: the updated client now also uses 17/1701.
 
@@ -244,7 +244,7 @@
 
 * Thu Mar 6 2003 Jacco de Leeuw <[email protected]> 0.69-5jdl
 - Replaced Dominique's patch by Damion de Soto's, which does not
-  depend on the N_HDLC kernel module. 
+  depend on the N_HDLC kernel module.
 
 * Wed Feb 26 2003 Jacco de Leeuw <[email protected]> 0.69-4jdl
 - Seperate example config files for Win9x (MSL2TP) and Win2K/XP
@@ -278,7 +278,7 @@
 - Specfile adapted from Mandrake Cooker. The original RPM can be
   retrieved through:
   http://www.rpmfind.net/linux/rpm2html/search.php?query=l2tpd
-- Config path changed from /etc/l2tp/ to /etc/l2tpd/ 
+- Config path changed from /etc/l2tp/ to /etc/l2tpd/
   (Seems more logical and rp-l2tp already uses /etc/l2tp/).
 - Do not run at boot or install. The original RPM uses a config file
   which is completely commented out, but it still starts l2tpd on all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/xl2tpd-control.c 
new/xl2tpd-1.3.13/xl2tpd-control.c
--- old/xl2tpd-1.3.10/xl2tpd-control.c  2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/xl2tpd-control.c  2018-12-03 18:30:06.000000000 +0100
@@ -87,22 +87,22 @@
     },
 
     /* LAC commands */
-    {"add-lac", &command_add_lac, TUNNEL_REQUIRED},
-    {"connect-lac", &command_connect_lac, TUNNEL_REQUIRED},
-    {"disconnect-lac", &command_disconnect_lac, TUNNEL_REQUIRED},
-    {"remove-lac", &command_remove_lac, TUNNEL_REQUIRED},
+    {"add-lac", &command_add_lac, TUNNEL_REQUIRED, ""},
+    {"connect-lac", &command_connect_lac, TUNNEL_REQUIRED, ""},
+    {"disconnect-lac", &command_disconnect_lac, TUNNEL_REQUIRED, ""},
+    {"remove-lac", &command_remove_lac, TUNNEL_REQUIRED, ""},
 
     /* LNS commands */
     {"add-lns", &command_add_lns, TUNNEL_REQUIRED,
         "\tadd-lns\tadds new or modify existing lns configuration.\n"
     },
-    {"remove-lns", &command_remove_lns, TUNNEL_REQUIRED},
+    {"remove-lns", &command_remove_lns, TUNNEL_REQUIRED, ""},
 
     /* Generic commands */
-    {"status", &command_status_lac, TUNNEL_REQUIRED},
-    {"status-lns", &command_status_lns, TUNNEL_REQUIRED},
-    {"available", &command_available, TUNNEL_NOT_REQUIRED},
-    {NULL, NULL}
+    {"status", &command_status_lac, TUNNEL_REQUIRED, ""},
+    {"status-lns", &command_status_lns, TUNNEL_REQUIRED, ""},
+    {"available", &command_available, TUNNEL_NOT_REQUIRED, ""},
+    {NULL, NULL, 0, NULL}
 };
 
 void usage()
@@ -463,6 +463,8 @@
 int command_disconnect_lac
 (FILE* mesf, char* tunnel, int optc, char *optv[])
 {
+    UNUSED(optc);
+    UNUSED(optv);
     fprintf (mesf, "%c %s", CONTROL_PIPE_REQ_LAC_DISCONNECT, tunnel);
     return 0;
 }
@@ -470,6 +472,8 @@
 int command_remove_lac
 (FILE* mesf, char* tunnel, int optc, char *optv[])
 {
+    UNUSED(optc);
+    UNUSED(optv);
     fprintf (mesf, "%c %s", CONTROL_PIPE_REQ_LAC_REMOVE, tunnel);
     return 0;
 }
@@ -477,6 +481,8 @@
 int command_status_lns
 (FILE* mesf, char* tunnel, int optc, char *optv[])
 {
+    UNUSED(optc);
+    UNUSED(optv);
     fprintf (mesf, "%c %s", CONTROL_PIPE_REQ_LNS_STATUS, tunnel);
     return 0;
 }
@@ -484,6 +490,8 @@
 int command_status_lac
 (FILE* mesf, char* tunnel, int optc, char *optv[])
 {
+    UNUSED(optc);
+    UNUSED(optv);
     fprintf (mesf, "%c %s", CONTROL_PIPE_REQ_LAC_STATUS, tunnel);
     return 0;
 }
@@ -491,6 +499,8 @@
 int command_available
 (FILE* mesf, char* tunnel, int optc, char *optv[])
 {
+    UNUSED(optc);
+    UNUSED(optv);
     fprintf (mesf, "%c %s", CONTROL_PIPE_REQ_AVAILABLE, tunnel);
     return 0;
 }
@@ -498,6 +508,8 @@
 int command_remove_lns
 (FILE* mesf, char* tunnel, int optc, char *optv[])
 {
+    UNUSED(optc);
+    UNUSED(optv);
     fprintf (mesf, "%c %s", CONTROL_PIPE_REQ_LNS_REMOVE, tunnel);
     return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xl2tpd-1.3.10/xl2tpd.c new/xl2tpd-1.3.13/xl2tpd.c
--- old/xl2tpd-1.3.10/xl2tpd.c  2017-08-02 19:46:06.000000000 +0200
+++ new/xl2tpd-1.3.13/xl2tpd.c  2018-12-03 18:30:06.000000000 +0100
@@ -75,7 +75,7 @@
 int control_handle_lac_disconnect(FILE* resf, char* bufp);
 int control_handle_lac_add_modify(FILE* resf, char* bufp);
 int control_handle_lac_remove(FILE* resf, char* bufp);
-int control_handle_lac_status(FILE* resf, char* bufp);
+int control_handle_lac_status();
 int control_handle_lns_remove(FILE* resf, char* bufp);
 
 struct control_requests_handler control_handlers[] = {
@@ -210,6 +210,7 @@
 
 void null_handler(int sig)
 {
+       UNUSED(sig);
        /* FIXME
         * A sighup is received when a call is terminated, unknown origine ..
         * I catch it and ll looks good, but ..
@@ -218,11 +219,13 @@
 
 void status_handler (int sig)
 {
+    UNUSED(sig);
     show_status ();
 }
 
-void child_handler (int signal)
+void child_handler (int sig)
 {
+    UNUSED(sig);
     /*
      * Oops, somebody we launched was killed.
      * It's time to reap them and close that call.
@@ -276,9 +279,13 @@
                      * it
                      */
 #ifdef USE_KERNEL
-                 if (!kernel_support)
+                 if (!kernel_support) {
+
 #endif
                     close (c->fd);
+#ifdef USE_KERNEL
+                 }
+#endif
                     c->fd = -1;
                     /*
                      * terminate tunnel and call loops, returning to the
@@ -340,26 +347,31 @@
 
 void sigterm_handler(int sig)
 {
+    UNUSED(sig);
     sigterm_received = 1;
 }
 
 void sigint_handler(int sig)
 {
+    UNUSED(sig);
     sigint_received = 1;
 }
 
 void sigchld_handler(int sig)
 {
+    UNUSED(sig);
     sigchld_received = 1;
 }
 
 void sigusr1_handler(int sig)
 {
+    UNUSED(sig);
     sigusr1_received = 1;
 }
 
 void sighup_handler(int sig)
 {
+    UNUSED(sig);
     sighup_received = 1;
 }
 
@@ -1020,7 +1032,8 @@
     return NULL; /* ml: Ok we could not find anything*/
 }
 
-int control_handle_available(FILE* resf, char* bufp){
+int control_handle_available(FILE* resf, char* bufp) {
+    UNUSED(bufp);
     struct lac *lac;
     struct lns *lns;
 
@@ -1529,7 +1542,7 @@
     return 1;
 }
 
-int control_handle_lac_status(FILE* resf, char* bufp){
+int control_handle_lac_status(){
     show_status ();
     return 1;
 }
@@ -1633,7 +1646,7 @@
 void usage(void) {
     printf("\nxl2tpd version:  %s\n", SERVER_VERSION);
     printf("Usage: xl2tpd [-c <config file>] [-s <secret file>] [-p <pid 
file>]\n"
-            "              [-C <control file>] [-D] [-l]\n"
+            "              [-C <control file>] [-D] [-l] [-q <tos decimal 
value for control>]\n"
             "              [-v, --version]\n");
     printf("\n");
     exit(1);
@@ -1651,6 +1664,7 @@
     memset(gconfig.configfile,0,STRLEN);
     memset(gconfig.pidfile,0,STRLEN);
     memset(gconfig.controlfile,0,STRLEN);
+    memset(gconfig.controltos,0,STRLEN);
     strncpy(gconfig.altauthfile,ALT_DEFAULT_AUTH_FILE,
             sizeof(gconfig.altauthfile) - 1);
     strncpy(gconfig.altconfigfile,ALT_DEFAULT_CONFIG_FILE,
@@ -1706,6 +1720,19 @@
                 strncpy(gconfig.controlfile,argv[i],
                         sizeof(gconfig.controlfile) - 1);
         }
+        else if (! strncmp(argv[i],"-q",2)) {
+            if(++i == argc)
+                usage();
+            else {
+               strncpy(gconfig.controltos,argv[i],
+                                       sizeof(gconfig.controltos) - 1);
+               if (atoi(gconfig.controltos)<0 || atoi(gconfig.controltos)>255)
+               {
+                       printf ("TOS value %s out of range(0-255)!\n", 
gconfig.controltos);
+                       usage();
+                }
+            }
+        }
         else {
             usage();
         }


Reply via email to