diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-01 16:14:02 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-01 16:14:02 +0100 |
commit | aef01e7679692cb2cf9eca0c03865cfd0a4e33c9 (patch) | |
tree | 4a000095846b696df937b27f28c2483b902028c7 /net-dialup/xl2tpd | |
parent | fbf0c3d1b463bf45fb0e9f119bec3424d6a44a4f (diff) |
gentoo auto-resync : 01:09:2023 - 16:14:02
Diffstat (limited to 'net-dialup/xl2tpd')
-rw-r--r-- | net-dialup/xl2tpd/Manifest | 2 | ||||
-rw-r--r-- | net-dialup/xl2tpd/files/xl2tpd-1.3.18-r1-close-calls-when-pppd-terminates.patch | 51 | ||||
-rw-r--r-- | net-dialup/xl2tpd/xl2tpd-1.3.18-r1.ebuild | 68 |
3 files changed, 121 insertions, 0 deletions
diff --git a/net-dialup/xl2tpd/Manifest b/net-dialup/xl2tpd/Manifest index dcbc0bb62b35..37899a5c24c9 100644 --- a/net-dialup/xl2tpd/Manifest +++ b/net-dialup/xl2tpd/Manifest @@ -1,8 +1,10 @@ +AUX xl2tpd-1.3.18-r1-close-calls-when-pppd-terminates.patch 1726 BLAKE2B 56433c1ca3a81e8f26c59235beeb0e105a9770e2faffa1657ff3c6bc79f48e248193fdb8b3ed50db11aa1c471a6b9a51c7801ff9857f572bb3ccdb6de7e4d513 SHA512 43a214c1fb0595648867e79b873356dff530340cc09b26cfac945152bb424b5ac0a912f5f53e9105ffc028cae3029018ea12c7c215a38fc57d7ded71dd1d6e5d AUX xl2tpd-init-r1 261 BLAKE2B f4aba90e73feeaea22401448681d60baf09854efaebe6d0a5722c96d2bb860653273351d1ce8a516b52491626db0e14ee1e8727b1b994b1ed1e1722ab9463214 SHA512 6d5aab46ee9dcdf3d15acc08d6d0dbbf868d27c4755526f3ae7c19dc9ba528d028a369a7779324687effa2458a60a06ee00984df99bcafce6a8aaa1113fc1788 AUX xl2tpd.conf 14 BLAKE2B ab6ecadf65d4cabd37779ea2de61860f1bced5b59e66cc6e4e960204ba04a4ecf2cef9fdacb79faec2f2e0966e299682d0cf99f97dd07c9873b3c6914a6668af SHA512 b209f3b365de37eb4a6b8c55fd06d79a09ac674e6bfcd40d08a7296f4ab64eb3b6d6b7338461192d19068868258ff70ea02261a56eaffb1bd15672921382ef72 AUX xl2tpd.service 232 BLAKE2B 16578777774cd7d378efb37f917e368d39f84267c45184d9b72a9d501f75e59cf2f14e1326c347cc4d62c541696a2cf4e5af51f13c0c909c26f908a374944e39 SHA512 184b4f63492c5a09fa61ebf0913a4a47e1cd3b321b80b122f2177ff8f5c9eccdc4a73831dfffc3c2e39325f5cb0b30c4e3f99c1f0fed1f21935be5da38a83579 DIST xl2tpd-1.3.16.tar.gz 531861 BLAKE2B 2f809c8623c1a77ee538014d4ff3389e32e142f8cd6acad1657198323835574dd3d062e5ed6ee81ded5c4a1a65d8e200759ed6013884bb655ca6f5eef5333931 SHA512 d92bd9070c0e78ba1f4f7ee38be9e87d1f869fe240433f2fd7d1c974f1bce1573ab7aeb5922f316e53bd0fd4580b6152d585b1e0e0cd6fb01ef8fa85d9509b16 DIST xl2tpd-1.3.18.tar.gz 534937 BLAKE2B ce745855709ac79d5d6aefbe2fb31a4e799f01c6ad31ad2e436c276933e079116daf32bcdc97b7459e4792aa2bd1ddbb600d798d8b28d1432681ffd319fe0829 SHA512 d1114777de5f3895429409fd5474da91fe9e9c218615eb989c9294de3e4e36dea7d8ea880a9b1b1ca18760e5709c8b8156c80d81401db479eaf215c026c3d861 EBUILD xl2tpd-1.3.16-r1.ebuild 1352 BLAKE2B b6ea79a94bfb5dcfc726fdb4fb996335901cc49a1dc72b28c3fea0c1fd5679b8167f96e0cd3024cf90c692010e953b28cb809753813f4ca2288d9c79ddb756d7 SHA512 6b39af75c317c0f32bf2c14f771959a637029f0e9f5b54dfc6270ec9e52d67833d61c7460f41fcb5926f01579394cf4463cc40b9eedca620b3db2bd35f9217cb +EBUILD xl2tpd-1.3.18-r1.ebuild 1440 BLAKE2B 81a25f83fd681dddea9412cd021e419259b4a2b575a305c9e5902c08c0e1d6db4ba49ead10ad70495f4aef44af8062f81c68c2a7c9d90b38c9a8d1608c798d07 SHA512 9157d9ab4158ade0cd478d53f8efaa6b194f93dad40af87c273a24810ffb8dc9ad4bdacd5f1079dd08c88e07b79b8c1920e049c90cd6e4300090acba8c1e2986 EBUILD xl2tpd-1.3.18.ebuild 1356 BLAKE2B e36c9f7486db49a783c7a24bcb367204aa705a2940a4c8c303ad58bc4e8096e9d57974b39ff36f6a72fe5905782934c370ee6323882e9b5efedc171a339169f4 SHA512 76c34d48e3c42fba4f99a257258e9da65324e241266aa5bed0971a8524daa47a0e4f743d717d9b6d7d5b9e0b0fdfaf84847adf93209a690d3a2c6e7ff3a60fc9 MISC metadata.xml 879 BLAKE2B 45303811850f78008ae08da56724fd3e9ee5048db230735230504468a2ba03c8c4f19ebbc8b648f0f490504c9df35eb9c667c6dc320802105eaddad1f2098f8c SHA512 287af9f09cf7066768307b7dbb6b570291e4e15592c178e9dad215b1c3229cbfe9bee06994050184525d2636d3c3e87172caab49b084a27fd583461fed334df3 diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.3.18-r1-close-calls-when-pppd-terminates.patch b/net-dialup/xl2tpd/files/xl2tpd-1.3.18-r1-close-calls-when-pppd-terminates.patch new file mode 100644 index 000000000000..ee70ca91cf2e --- /dev/null +++ b/net-dialup/xl2tpd/files/xl2tpd-1.3.18-r1-close-calls-when-pppd-terminates.patch @@ -0,0 +1,51 @@ +https://github.com/xelerance/xl2tpd/pull/261 +From 65a0473569c51a07309bbc0836ff4262b72297c7 Mon Sep 17 00:00:00 2001 +From: Jaco Kroon <jaco@uls.co.za> +Date: Fri, 1 Sep 2023 11:05:29 +0200 +Subject: [PATCH] xl2tpd: Close calls when underlying pppd terminate. + +Unsure the cause, but we found that upon ppp terminating xl2tpd would +only reap the PID, but not actually close the inner call, then at a +later stage would issue a kill() for that PID. + +In our environment with high call turnover this would eventually result +in xl2tpd kill()'ing other critical services like mariadb and/or +syslog-ng which would upon reloads and rotations have a tendency to +re-use PIDs that were previously used by pppd processes. + +We also believe that this should sort out the problem where IPs wouldn't +get cycled and re-used. + +Closes: #252 +Closes: #255 +Signed-off-by: Jaco Kroon <jaco@uls.co.za> +--- + xl2tpd.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/xl2tpd.c b/xl2tpd.c +index 791d5a4..4047bca 100644 +--- a/xl2tpd.c ++++ b/xl2tpd.c +@@ -257,6 +257,9 @@ static void child_handler (int sig) + { + 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 @@ static void child_handler (int sig) + #endif + close (c->fd); + #ifdef USE_KERNEL ++ } else { ++ call_close (c); + } + #endif + c->fd = -1; +-- +2.41.0 + diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.18-r1.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.18-r1.ebuild new file mode 100644 index 000000000000..7a4b224fb5ef --- /dev/null +++ b/net-dialup/xl2tpd/xl2tpd-1.3.18-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs tmpfiles + +DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon" +HOMEPAGE="https://github.com/xelerance/xl2tpd" +SRC_URI="https://github.com/xelerance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86" +IUSE="+kernel" + +DEPEND=" + net-libs/libpcap + >=sys-kernel/linux-headers-2.6" + +RDEPEND=" + ${DEPEND} + net-dialup/ppp" + +DOCS=( CREDITS README.md BUGS CHANGES TODO doc/README.patents ) + +PATCHES=( + "${FILESDIR}/xl2tpd-1.3.18-r1-close-calls-when-pppd-terminates.patch" +) + +src_prepare() { + default + sed -e 's:/var/run/:/run/:' -i \ + file.h \ + l2tp.h \ + xl2tpd-control.c \ + doc/l2tp-secrets.5 \ + doc/xl2tpd.8 \ + doc/xl2tpd.conf.5 \ + || die "Error updating /var/run to /run" +} + +src_compile() { + tc-export CC + local OSFLAGS="-DLINUX" + use kernel && OSFLAGS+=" -DUSE_KERNEL" + emake OSFLAGS="${OSFLAGS}" +} + +src_install() { + emake PREFIX=/usr DESTDIR="${D}" install + + newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd + + systemd_dounit "${FILESDIR}"/xl2tpd.service + dotmpfiles "${FILESDIR}"/xl2tpd.conf + + einstalldocs + + insinto /etc/xl2tpd + newins doc/l2tpd.conf.sample xl2tpd.conf + insopts -m 0600 + newins doc/l2tp-secrets.sample l2tp-secrets +} + +pkg_postinst() { + tmpfiles_process xl2tpd.conf +} |