Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xl2tpd for openSUSE:Factory checked in at 2026-02-24 15:37:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xl2tpd (Old) and /work/SRC/openSUSE:Factory/.xl2tpd.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xl2tpd" Tue Feb 24 15:37:54 2026 rev:30 rq:1334454 version:1.3.20 Changes: -------- --- /work/SRC/openSUSE:Factory/xl2tpd/xl2tpd.changes 2025-02-27 14:52:52.585339846 +0100 +++ /work/SRC/openSUSE:Factory/.xl2tpd.new.1977/xl2tpd.changes 2026-02-24 15:38:03.361062690 +0100 @@ -1,0 +2,21 @@ +Wed Feb 4 20:17:20 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 1.3.20 + * xl2tpd: Close calls when underlying pppd terminate. + * Fix compiling with C23. +- Drop patch: + * xl2tpd-gcc15.patch +- Adjust one "invalid" date from the changelog + Running source_service 'source_validator' ... + date: invalid date "Wed Mar 6 21:15:13 YEKT 2013" + +------------------------------------------------------------------- +Sun Apr 13 12:19:59 UTC 2025 - Martin Hauke <[email protected]> + +- Update to version 1.3.19 + * Only force userspace when ipsec saref enabled. + * Control: avoid compiler warnings. + * Fix typo. + * Fix a gcc-warning related to 'struct payload_hdr' pointer. + +------------------------------------------------------------------- @@ -170 +191 @@ -Wed Mar 6 21:15:13 YEKT 2013 - [email protected] +Wed Mar 6 21:15:13 UTC 2013 - [email protected] Old: ---- v1.3.18.tar.gz xl2tpd-gcc15.patch New: ---- v1.3.20.tar.gz ----------(Old B)---------- Old:- Drop patch: * xl2tpd-gcc15.patch - Adjust one "invalid" date from the changelog ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xl2tpd.spec ++++++ --- /var/tmp/diff_new_pack.0MfNCK/_old 2026-02-24 15:38:04.185096897 +0100 +++ /var/tmp/diff_new_pack.0MfNCK/_new 2026-02-24 15:38:04.189097063 +0100 @@ -1,7 +1,7 @@ # # spec file for package xl2tpd # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,13 +16,9 @@ # -%if 0%{?suse_version} <= 1310 -%define rundir %{_localstatedir}/run -%else %define rundir /run -%endif Name: xl2tpd -Version: 1.3.18 +Version: 1.3.20 Release: 0 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661) License: GPL-2.0-only @@ -33,7 +29,6 @@ Source2: %{name}.conf Patch0: Makefile.patch Patch1: xl2tpd.init.patch -Patch2: xl2tpd-gcc15.patch BuildRequires: libpcap BuildRequires: libpcap-devel BuildRequires: linux-kernel-headers >= 2.6.19 ++++++ v1.3.18.tar.gz -> v1.3.20.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/.github/workflows/build.yml new/xl2tpd-1.3.20/.github/workflows/build.yml --- old/xl2tpd-1.3.18/.github/workflows/build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/xl2tpd-1.3.20/.github/workflows/build.yml 2026-02-04 20:59:01.000000000 +0100 @@ -0,0 +1,27 @@ +name: build + +on: + pull_request: + workflow_dispatch: + +jobs: + build: + uses: Itexoft/DevOpsKit/.github/workflows/autotools-multi-rid-build.yml@d7ba1b8c1e7d9a9bf54003af3c49fa1a722b94ce + with: + project_name: xl2tpd + apt_packages: libpcap-dev + build_cmd: | + if [ "$RUNNER_OS" = "macOS" ]; then + sed -i '' '/OSFLAGS+= -DUSE_KERNEL/d' Makefile + sed -i '' 's/#if !defined(LINUX)/#if !defined(LINUX) \&\& !defined(__APPLE__)/' osport.h + mkdir -p darwin-headers/net + curl -L https://raw.githubusercontent.com/apple/darwin-xnu/main/bsd/net/ppp_defs.h \ + -o darwin-headers/net/ppp_defs.h + make OSFLAGS="-DFREEBSD -I$PWD/darwin-headers" xl2tpd + make OSFLAGS="-DFREEBSD -I$PWD/darwin-headers" pfc xl2tpd-control + else + make xl2tpd + make pfc xl2tpd-control + fi + cp xl2tpd xl2tpd-control "$GITHUB_WORKSPACE/$ARTIFACTS_DIR" + enable_windows: "false" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/.github/workflows/macos-xl2tpd-tests.yml new/xl2tpd-1.3.20/.github/workflows/macos-xl2tpd-tests.yml --- old/xl2tpd-1.3.18/.github/workflows/macos-xl2tpd-tests.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/xl2tpd-1.3.20/.github/workflows/macos-xl2tpd-tests.yml 2026-02-04 20:59:01.000000000 +0100 @@ -0,0 +1,44 @@ +name: macOS xl2tpd functional tests + +on: + workflow_run: + workflows: [ "build" ] + types: [ completed ] + branches: [ master, main ] + +permissions: + actions: read + contents: read + +jobs: + macos_tests: + if: github.event.workflow_run.conclusion == 'success' + runs-on: macos-14 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_sha }} + - uses: actions/download-artifact@v4 + with: + name: xl2tpd-osx + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ github.token }} + path: artifacts + - run: cp artifacts/xl2tpd artifacts/xl2tpd-control . + - run: chmod +x xl2tpd xl2tpd-control || true + - run: | + if [ -x tests/macos/run.sh ]; then + bash tests/macos/run.sh + elif grep -q "^check:" Makefile 2>/dev/null; then + make check + elif [ -x scripts/test-macos.sh ]; then + bash scripts/test-macos.sh + else + echo "No tests defined" && exit 1 + fi + - if: always() + uses: actions/upload-artifact@v4 + with: + name: macos-xl2tpd-logs + path: .ci-artifacts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/CHANGES new/xl2tpd-1.3.20/CHANGES --- old/xl2tpd-1.3.18/CHANGES 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/CHANGES 2026-02-04 20:59:01.000000000 +0100 @@ -1,3 +1,16 @@ +v1.3.20 (February 04, 2026) +* xl2tpd: Close calls when underlying pppd terminate. [Jaco Kroon] +* debian: Install xl2tpd.service [Will Thompson] +* Fix compiling with C23. [Jaco Kroon] +* Update Debian configuraiton [Samir Hussain] +* control: Drop dependency on now-obsolete lsb-base [Samuel Thibault] + +v1.3.19 (April 11, 2025) +* Only force userspace when ipsec saref enabled [Kyle Russell] +* control: avoid compiler warnings. [Jaco Kroon] +* fix typo [lilinjie] +* fix a gcc-warning related to 'struct payload_hdr' pointer [Lorinczy Zsigmond] + v1.3.18 (Nov 01, 2022) * Set default debian branch [Samuel Thibault] * watch: Turn rc version piece into ~rc [Samuel Thibault] @@ -392,7 +405,7 @@ v1.1.08 * Confirmed pppd bug of not always terminating on SIGTERM. The new define - TRUST_PPPD_TO_DIE determins whether we send SIGTERM or SIGKILL, with + TRUST_PPPD_TO_DIE determines whether we send SIGTERM or SIGKILL, with SIGKILL being the (new) default. (ppp-2.4.2-6.4.RHEL4 is known to be broken) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/Makefile.ver new/xl2tpd-1.3.20/Makefile.ver --- old/xl2tpd-1.3.18/Makefile.ver 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/Makefile.ver 2026-02-04 20:59:01.000000000 +0100 @@ -1 +1 @@ -XL2TPDVERSION=1.3.18 +XL2TPDVERSION=1.3.20 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/control.c new/xl2tpd-1.3.20/control.c --- old/xl2tpd-1.3.18/control.c 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/control.c 2026-02-04 20:59:01.000000000 +0100 @@ -250,9 +250,9 @@ add_bearer_caps_avp (buf, t->ourbc); /* FIXME: Tie breaker */ add_firmware_avp (buf); - if (t->lac && t->lac->hostname && t->lac->hostname[0]) + if (t->lac && t->lac->hostname[0]) add_hostname_avp (buf, t->lac->hostname); - else if (t->lns && t->lns->hostname && t->lns->hostname[0]) + else if (t->lns && t->lns->hostname[0]) add_hostname_avp (buf, t->lns->hostname); else add_hostname_avp (buf, hostname); @@ -468,9 +468,9 @@ add_frame_caps_avp (buf, t->ourfc); add_bearer_caps_avp (buf, t->ourbc); add_firmware_avp (buf); - if (t->lac && t->lac->hostname && t->lac->hostname[0]) + if (t->lac && t->lac->hostname[0]) add_hostname_avp (buf, t->lac->hostname); - else if (t->lns && t->lns->hostname && t->lns->hostname[0]) + else if (t->lns && t->lns->hostname[0]) add_hostname_avp (buf, t->lns->hostname); else add_hostname_avp (buf, hostname); @@ -861,18 +861,26 @@ c->serno, t->refme, t->refhim); control_xmit (buf); po = NULL; +#ifndef __APPLE__ po = add_opt (po, "passive"); po = add_opt (po, "nodetach"); +#endif if (c->lac) { +#ifndef __APPLE__ if (c->lac->defaultroute) po = add_opt (po, "defaultroute"); +#endif strncpy (ip1, IPADDY (c->lac->localaddr), sizeof (ip1)); strncpy (ip2, IPADDY (c->lac->remoteaddr), sizeof (ip2)); #ifdef IP_ALLOCATION po = add_opt (po, "%s:%s", c->lac->localaddr ? ip1 : "", c->lac->remoteaddr ? ip2 : ""); #endif +#ifdef __APPLE__ + if (c->lac->defaultroute) + po = add_opt (po, "defaultroute"); +#endif if (c->lac->authself) { if (c->lac->pap_refuse) @@ -978,8 +986,10 @@ strncpy (ip1, IPADDY (c->lns->localaddr), sizeof (ip1)); strncpy (ip2, IPADDY (c->addr), sizeof (ip2)); po = NULL; +#ifndef __APPLE__ po = add_opt (po, "passive"); po = add_opt (po, "nodetach"); +#endif po = add_opt (po, "%s:%s", c->lns->localaddr ? ip1 : "", ip2); if (c->lns->authself) { @@ -1032,8 +1042,10 @@ break; case OCCN: /* jz: get OCCN, so the only thing we must do is to start the pppd */ po = NULL; +#ifndef __APPLE__ po = add_opt (po, "passive"); po = add_opt (po, "nodetach"); +#endif po = add_opt (po, "file"); strcat (dummy_buf, c->dial_no); /* jz: use /etc/ppp/dialnumber.options for pppd - kick it if you don't like */ strcat (dummy_buf, ".options"); @@ -1421,7 +1433,8 @@ * check_payload() should already be called as a prerequisite. */ struct payload_hdr *h = (struct payload_hdr *) (buf->start); - _u16 *r = (_u16 *) h; /* Nice to have raw word pointers */ + typedef _u16 __attribute__((aligned(1))) _u16_ua; + _u16_ua *r = (_u16_ua *) h; /* Nice to have raw word pointers */ struct payload_hdr *new_hdr; int ehlen = 0; /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/debian/changelog new/xl2tpd-1.3.20/debian/changelog --- old/xl2tpd-1.3.18/debian/changelog 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/debian/changelog 2026-02-04 20:59:01.000000000 +0100 @@ -1,3 +1,15 @@ +xl2tpd (1.3.19-1) unstable; urgency=medium + + * New upstream release. + + -- Samir Hussain <[email protected]> Fri, 11 Apr 2025 09:30:00 -0400 + +xl2tpd (1.3.18-2) UNRELEASED; urgency=medium + + * control: Drop dependency on now-obsolete lsb-base. + + -- Samuel Thibault <[email protected]> Fri, 14 Jul 2023 16:21:27 +0200 + xl2tpd (1.3.18-1) unstable; urgency=medium * New upstream release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/debian/control new/xl2tpd-1.3.20/debian/control --- old/xl2tpd-1.3.18/debian/control 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/debian/control 2026-02-04 20:59:01.000000000 +0100 @@ -13,7 +13,7 @@ Architecture: any Multi-Arch: foreign Provides: l2tpd -Depends: ${shlibs:Depends}, ${misc:Depends}, ppp, lsb-base (>= 3.0-6) +Depends: ${shlibs:Depends}, ${misc:Depends}, ppp 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.18/debian/rules new/xl2tpd-1.3.20/debian/rules --- old/xl2tpd-1.3.18/debian/rules 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/debian/rules 2026-02-04 20:59:01.000000000 +0100 @@ -59,6 +59,7 @@ dh_installexamples # dh_install dh_installinit + dh_installsystemd dh_installman cp debian/lintian-overrides \ debian/xl2tpd/usr/share/lintian/overrides/xl2tpd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/file.c new/xl2tpd-1.3.20/file.c --- old/xl2tpd-1.3.18/file.c 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/file.c 2026-02-04 20:59:01.000000000 +0100 @@ -1231,7 +1231,7 @@ if(g->ipsecsaref) { l2tp_log(LOG_INFO, "Enabling IPsec SAref processing for L2TP transport mode SAs\n"); } - if(g->forceuserspace != 1) { + if(g->ipsecsaref && g->forceuserspace != 1) { l2tp_log(LOG_WARNING, "IPsec SAref does not work with L2TP kernel mode yet, enabling force userspace=yes\n"); g->forceuserspace = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/l2tp.h new/xl2tpd-1.3.20/l2tp.h --- old/xl2tpd-1.3.18/l2tp.h 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/l2tp.h 2026-02-04 20:59:01.000000000 +0100 @@ -59,7 +59,7 @@ #define CONTROL_PIPE_REQ_LNS_REMOVE 'w' /* Get status of LNS */ #define BINARY "xl2tpd" -#define SERVER_VERSION "xl2tpd-1.3.18" +#define SERVER_VERSION "xl2tpd-1.3.20" #define VENDOR_NAME "xelerance.com" #ifndef PPPD #define PPPD "/usr/sbin/pppd" @@ -79,7 +79,7 @@ _u16 Nr; /* Next received */ } __attribute__((packed)); -#define CTBIT(ver) (ver & 0x8000) /* Determins if control or not */ +#define CTBIT(ver) (ver & 0x8000) /* Determines if control or not */ #define CLBIT(ver) (ver & 0x4000) /* Length bit present. Must be 1 for control messages */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/packaging/fedora/xl2tpd.spec new/xl2tpd-1.3.20/packaging/fedora/xl2tpd.spec --- old/xl2tpd-1.3.18/packaging/fedora/xl2tpd.spec 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/packaging/fedora/xl2tpd.spec 2026-02-04 20:59:01.000000000 +0100 @@ -1,6 +1,6 @@ Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661) Name: xl2tpd -Version: 1.3.18 +Version: 1.3.20 Release: 1%{?dist} License: GPLv2 Url: http://www.xelerance.com/software/xl2tpd/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/packaging/openwrt/Makefile new/xl2tpd-1.3.20/packaging/openwrt/Makefile --- old/xl2tpd-1.3.18/packaging/openwrt/Makefile 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/packaging/openwrt/Makefile 2026-02-04 20:59:01.000000000 +0100 @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xl2tpd -PKG_VERSION:=1.3.18 +PKG_VERSION:=1.3.20 PKG_RELEASE:=1 PKG_MD5SUM:=ab5656eb5a3d1973f7f69b039675332e-NEEDSUPDATING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/packaging/suse/sles10.spec new/xl2tpd-1.3.20/packaging/suse/sles10.spec --- old/xl2tpd-1.3.18/packaging/suse/sles10.spec 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/packaging/suse/sles10.spec 2026-02-04 20:59:01.000000000 +0100 @@ -1,6 +1,6 @@ Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661) Name: xl2tpd -Version: 1.3.18 +Version: 1.3.20 Release: 1%{?dist} License: GPLv2 Url: http://www.xelerance.com/software/xl2tpd/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/packaging/suse/xl2tpd.spec new/xl2tpd-1.3.20/packaging/suse/xl2tpd.spec --- old/xl2tpd-1.3.18/packaging/suse/xl2tpd.spec 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/packaging/suse/xl2tpd.spec 2026-02-04 20:59:01.000000000 +0100 @@ -22,7 +22,7 @@ %define rundir /run %endif Name: xl2tpd -Version: 1.3.18 +Version: 1.3.20 Release: 0 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661) License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/tests/macos/handshake_loopback.sh new/xl2tpd-1.3.20/tests/macos/handshake_loopback.sh --- old/xl2tpd-1.3.18/tests/macos/handshake_loopback.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/xl2tpd-1.3.20/tests/macos/handshake_loopback.sh 2026-02-04 20:59:01.000000000 +0100 @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +set -euo pipefail +root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +bin="$root/xl2tpd" +ctl="$root/xl2tpd-control" +work="$root/.ci-artifacts/macos/handshake" +rm -rf "$work" +mkdir -p "$work" +sudo pkill xl2tpd 2>/dev/null || true +sudo mkdir -p /var/run/xl2tpd +sudo chown "$(id -u):$(id -g)" /var/run/xl2tpd +sudo rm -f /var/run/xl2tpd.pid +port_srv=51701 +port_cli=51702 +srv_cfg="$work/xl2tpd-server.conf" +cli_cfg="$work/xl2tpd-client.conf" +srv_ctl="$work/server.control" +cli_ctl="$work/client.control" +srv_log="$work/server.log" +cli_log="$work/client.log" +ppp_srv="$work/options.l2tpd.lns" +ppp_cli="$work/options.l2tpd.client" +srv_pidf="$work/server.pid" +cli_pidf="$work/client.pid" +printf "lcp-echo-interval 5\nlcp-echo-failure 3\nnoccp\nnoauth\nmtu 1280\nmru 1280\n" > "$ppp_srv" +printf "lcp-echo-interval 5\nlcp-echo-failure 3\nnoccp\nnoauth\nmtu 1280\nmru 1280\n" > "$ppp_cli" +cat > "$srv_cfg" <<EOF2 +[global] +port = $port_srv +listen-addr = 127.0.0.1 +access control = no +debug packet = yes +debug state = yes +debug tunnel = yes + +[lns default] +ip range = 10.99.0.2-10.99.0.10 +local ip = 10.99.0.1 +ppp debug = yes +pppoptfile = $ppp_srv +length bit = yes + +EOF2 +cat > "$cli_cfg" <<EOF3 +[global] +port = $port_cli +listen-addr = 127.0.0.1 +access control = no +debug packet = yes +debug state = yes +debug tunnel = yes + +[lac loop] +lns = 127.0.0.1:$port_srv +ppp debug = yes +pppoptfile = $ppp_cli +autodial = no + +EOF3 +"$bin" -D -c "$srv_cfg" -C "$srv_ctl" -p "$srv_pidf" >"$srv_log" 2>&1 & +srv_pid=$! +sleep 1 +"$bin" -D -c "$cli_cfg" -C "$cli_ctl" -p "$cli_pidf" >"$cli_log" 2>&1 & +cli_pid=$! +sleep 1 +"$ctl" -c "$cli_ctl" connect-lac loop || true +deadline=$((SECONDS+15)) +ok=0 +while [ $SECONDS -lt $deadline ]; do + if grep -qE "SCCRQ|SCCRP|SCCCN" "$srv_log"; then + ok=1 + break + fi + sleep 1 +done +kill "$cli_pid" || true +kill "$srv_pid" || true +wait || true +test "$ok" -eq 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/tests/macos/multi_sessions.sh new/xl2tpd-1.3.20/tests/macos/multi_sessions.sh --- old/xl2tpd-1.3.18/tests/macos/multi_sessions.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/xl2tpd-1.3.20/tests/macos/multi_sessions.sh 2026-02-04 20:59:01.000000000 +0100 @@ -0,0 +1,83 @@ +#!/usr/bin/env bash +set -euo pipefail +root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +bin="$root/xl2tpd" +ctl="$root/xl2tpd-control" +work="$root/.ci-artifacts/macos/multi" +rm -rf "$work" +mkdir -p "$work" +sudo pkill xl2tpd 2>/dev/null || true +sudo mkdir -p /var/run/xl2tpd +sudo chown "$(id -u):$(id -g)" /var/run/xl2tpd +sudo rm -f /var/run/xl2tpd.pid +port_srv=51721 +port_cli=51722 +srv_cfg="$work/srv.conf" +cli_cfg="$work/cli.conf" +srv_ctl="$work/srv.ctrl" +cli_ctl="$work/cli.ctrl" +srv_log="$work/srv.log" +cli_log="$work/cli.log" +ppp_srv="$work/opt.lns" +ppp_cli="$work/opt.cli" +srv_pidf="$work/srv.pid" +cli_pidf="$work/cli.pid" +printf "noccp\nnoauth\nmtu 1200\nmru 1200\n" > "$ppp_srv" +printf "noccp\nnoauth\nmtu 1200\nmru 1200\n" > "$ppp_cli" +cat > "$srv_cfg" <<EOF2 +[global] +port = $port_srv +listen-addr = 127.0.0.1 +access control = no +debug packet = yes +debug state = yes + +[lns default] +ip range = 10.77.0.2-10.77.0.20 +local ip = 10.77.0.1 +pppoptfile = $ppp_srv +length bit = yes +ppp debug = yes + +EOF2 +cat > "$cli_cfg" <<EOF3 +[global] +port = $port_cli +listen-addr = 127.0.0.1 +access control = no +debug packet = yes +debug state = yes + +[lac dummy] +lns = 0.0.0.0 +autodial = no + +EOF3 +"$bin" -D -c "$srv_cfg" -C "$srv_ctl" -p "$srv_pidf" >"$srv_log" 2>&1 & +srv_pid=$! +sleep 1 +"$bin" -D -c "$cli_cfg" -C "$cli_ctl" -p "$cli_pidf" >"$cli_log" 2>&1 & +cli_pid=$! +sleep 1 +n=5 +i=1 +while [ $i -le $n ]; do + name="s$i" + "$ctl" -c "$cli_ctl" add-lac "$name" lns=127.0.0.1:$port_srv pppoptfile="$ppp_cli" + "$ctl" -c "$cli_ctl" connect-lac "$name" || true + i=$((i+1)) +done +deadline=$((SECONDS+20)) +ok=0 +while [ $SECONDS -lt $deadline ]; do + cnt=$(grep -Eoc "SCCRQ|Start-Control-Connection-Request" "$srv_log" || true) + if [ "$cnt" -ge "$n" ]; then + ok=1 + break + fi + sleep 1 +done +kill "$cli_pid" || true +kill "$srv_pid" || true +wait || true +test "$ok" -eq 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/tests/macos/ppp_loopback.sh new/xl2tpd-1.3.20/tests/macos/ppp_loopback.sh --- old/xl2tpd-1.3.18/tests/macos/ppp_loopback.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/xl2tpd-1.3.20/tests/macos/ppp_loopback.sh 2026-02-04 20:59:01.000000000 +0100 @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +set -euo pipefail +if [ "${CI_ALLOW_PPP_E2E:-0}" != "1" ]; then + exit 0 +fi +if ! command -v pppd >/dev/null 2>&1; then + exit 0 +fi +if ! sudo -n true 2>/dev/null; then + exit 0 +fi +root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +bin="$root/xl2tpd" +ctl="$root/xl2tpd-control" +work="$root/.ci-artifacts/macos/ppp" +rm -rf "$work" +mkdir -p "$work" +sudo pkill xl2tpd 2>/dev/null || true +sudo mkdir -p /var/run/xl2tpd +sudo rm -f /var/run/xl2tpd.pid +port_srv=51711 +port_cli=51712 +srv_cfg="$work/srv.conf" +cli_cfg="$work/cli.conf" +srv_ctl="$work/server.control" +cli_ctl="$work/client.control" +srv_log="$work/server.log" +cli_log="$work/client.log" +ppp_srv="$work/options.l2tpd.lns" +ppp_cli="$work/options.l2tpd.client" +srv_pidf="$work/srv.pid" +cli_pidf="$work/cli.pid" +sudo mkdir -p /etc/ppp +printf "\"client\"\t\"lns\"\t\"testpass\"\t\"*\"\n" | sudo tee /etc/ppp/chap-secrets >/dev/null +printf "name lns\nrequire-mschap-v2\nnoccp\nnodefaultroute\nmtu 1280\nmru 1280\nlcp-echo-interval 5\nlcp-echo-failure 3\n" > "$ppp_srv" +printf "user client\npassword testpass\nremotename lns\nnoauth\nipcp-accept-local\nipcp-accept-remote\nmtu 1280\nmru 1280\nlcp-echo-interval 5\nlcp-echo-failure 3\n" > "$ppp_cli" +cat > "$srv_cfg" <<EOF2 +[global] +port = $port_srv +listen-addr = 127.0.0.1 +access control = no + +[lns default] +ip range = 10.66.0.2-10.66.0.10 +local ip = 10.66.0.1 +pppoptfile = $ppp_srv +ppp debug = yes +length bit = yes +refuse pap = yes + +EOF2 +cat > "$cli_cfg" <<EOF3 +[global] +port = $port_cli +listen-addr = 127.0.0.1 + +[lac loop] +lns = 127.0.0.1:$port_srv +pppoptfile = $ppp_cli +ppp debug = yes +autodial = no + +EOF3 +sudo "$bin" -D -c "$srv_cfg" -C "$srv_ctl" -p "$srv_pidf" >"$srv_log" 2>&1 & +srv_pid=$! +sleep 1 +sudo "$bin" -D -c "$cli_cfg" -C "$cli_ctl" -p "$cli_pidf" >"$cli_log" 2>&1 & +cli_pid=$! +sleep 1 +sudo "$ctl" -c "$cli_ctl" connect-lac loop +deadline=$((SECONDS+30)) +ok=0 +while [ $SECONDS -lt $deadline ]; do + if ifconfig -l | tr ' ' '\n' | grep -q '^ppp'; then + ok=1 + break + fi + sleep 1 +done +if [ $ok -eq 1 ]; then + ping -c 1 10.66.0.1 || true +fi +sudo kill "$cli_pid" || true +sudo kill "$srv_pid" || true +wait || true +test "$ok" -eq 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/tests/macos/run.sh new/xl2tpd-1.3.20/tests/macos/run.sh --- old/xl2tpd-1.3.18/tests/macos/run.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/xl2tpd-1.3.20/tests/macos/run.sh 2026-02-04 20:59:01.000000000 +0100 @@ -0,0 +1,5 @@ +set -e +d=$(dirname "$0") +for t in handshake_loopback.sh multi_sessions.sh ppp_loopback.sh; do + bash "$d/$t" +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xl2tpd-1.3.18/xl2tpd.c new/xl2tpd-1.3.20/xl2tpd.c --- old/xl2tpd-1.3.18/xl2tpd.c 2022-11-01 21:43:30.000000000 +0100 +++ new/xl2tpd-1.3.20/xl2tpd.c 2026-02-04 20:59:01.000000000 +0100 @@ -74,7 +74,7 @@ static int control_handle_lac_disconnect(FILE* resf, char* bufp); static int control_handle_lac_add_modify(FILE* resf, char* bufp); static int control_handle_lac_remove(FILE* resf, char* bufp); -static int control_handle_lac_status(); +static int control_handle_lac_status(FILE* resf, char* bufp); static int control_handle_lns_remove(FILE* resf, char* bufp); static struct control_requests_handler control_handlers[] = { @@ -257,6 +257,9 @@ { if (c->pppd == pid) { + /* pid is no longer valid, avoid killing it later by accident in destroy_call() */ + c->pppd = 0; + if ( WIFEXITED( status ) ) { l2tp_log (LOG_DEBUG, "%s : pppd exited for call %d with code %d\n", __FUNCTION__, @@ -283,6 +286,8 @@ #endif close (c->fd); #ifdef USE_KERNEL + } else { + call_close (c); } #endif c->fd = -1; @@ -491,6 +496,9 @@ l2tp_log (LOG_WARNING, "unable to open tty %s, cannot start pppd", tty); return -EINVAL; } +#ifdef __APPLE__ + stropt[pos++] = strdup("device"); +#endif stropt[pos++] = strdup(tty); } @@ -1549,7 +1557,8 @@ return 1; } -static int control_handle_lac_status(){ +static int control_handle_lac_status(FILE*, char*) +{ show_status (); return 1; }
