commit:     7fba1ae8a6a18bd43afc1f23171b6cbfab7832aa
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 21 17:41:40 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 21 17:41:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fba1ae8

net-dialup/ppp: fix pppol2tp plugin with USE=-ipv6

Closes: https://bugs.gentoo.org/904740
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-dialup/ppp/files/ppp-2.4.9-pppol2tp-ipv6.patch | 28 ++++++++++++++++++++++
 .../{ppp-2.4.9-r8.ebuild => ppp-2.4.9-r9.ebuild}   |  3 ++-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/net-dialup/ppp/files/ppp-2.4.9-pppol2tp-ipv6.patch 
b/net-dialup/ppp/files/ppp-2.4.9-pppol2tp-ipv6.patch
new file mode 100644
index 000000000000..40773b2b0d54
--- /dev/null
+++ b/net-dialup/ppp/files/ppp-2.4.9-pppol2tp-ipv6.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/904740
+https://github.com/ppp-project/ppp/pull/319
+
+From 44a70d6f9eb6d1843868da1d45de382134a03630 Mon Sep 17 00:00:00 2001
+From: str8fast <[email protected]>
+Date: Thu, 28 Oct 2021 14:55:56 +0000
+Subject: [PATCH] pppol2tp.c add '#ifdef INET6' for optional ipv6
+
+Without it, l2tp daemon can't launch ppp, cuz undefined symbol 
ipv6_up_notifier.
+---
+ pppd/plugins/pppol2tp/pppol2tp.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pppd/plugins/pppol2tp/pppol2tp.c 
b/pppd/plugins/pppol2tp/pppol2tp.c
+index ed2d7c79..c9902afe 100644
+--- a/pppd/plugins/pppol2tp/pppol2tp.c
++++ b/pppd/plugins/pppol2tp/pppol2tp.c
+@@ -509,8 +509,10 @@ void plugin_init(void)
+        */
+       add_notifier(&ip_up_notifier, pppol2tp_ip_up, NULL);
+       add_notifier(&ip_down_notifier, pppol2tp_ip_down, NULL);
++#ifdef INET6
+       add_notifier(&ipv6_up_notifier, pppol2tp_ip_up, NULL);
+       add_notifier(&ipv6_down_notifier, pppol2tp_ip_down, NULL);
++#endif
+ }
+ 
+ struct channel pppol2tp_channel = {

diff --git a/net-dialup/ppp/ppp-2.4.9-r8.ebuild 
b/net-dialup/ppp/ppp-2.4.9-r9.ebuild
similarity index 98%
rename from net-dialup/ppp/ppp-2.4.9-r8.ebuild
rename to net-dialup/ppp/ppp-2.4.9-r9.ebuild
index bd9aed59ed9f..6e5887b815f6 100644
--- a/net-dialup/ppp/ppp-2.4.9-r8.ebuild
+++ b/net-dialup/ppp/ppp-2.4.9-r9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -40,6 +40,7 @@ src_prepare() {
        eapply "${FILESDIR}"/${P}-fix-MPPE-sstpc.patch
        eapply "${FILESDIR}"/${P}-fix-clang-nested-functions.patch
        eapply "${FILESDIR}"/${P}-fix-openssl-sysroot-clang.patch
+       eapply "${FILESDIR}"/${P}-pppol2tp-ipv6.patch
 
        #IPX Support is removed in kernel >= 5.15
        sed -i 's/-DIPX_CHANGE //' pppd/Makefile.linux || die

Reply via email to