From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/oidentd/files/, net-misc/oidentd/
Date: Tue, 17 Aug 2021 18:41:39 +0000 (UTC) [thread overview]
Message-ID: <1629225691.0c65bd4dd2f7001b8c521e06f5378e661a0d063b.conikost@gentoo> (raw)
commit: 0c65bd4dd2f7001b8c521e06f5378e661a0d063b
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 17 18:41:06 2021 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Aug 17 18:41:31 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c65bd4d
net-misc/oidentd: fix compilation with disabled ipv6
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
.../files/oidentd-3.0.0-ipv6-masquerade.patch | 85 ++++++++++++++++++++++
net-misc/oidentd/oidentd-3.0.0-r1.ebuild | 2 +
2 files changed, 87 insertions(+)
diff --git a/net-misc/oidentd/files/oidentd-3.0.0-ipv6-masquerade.patch b/net-misc/oidentd/files/oidentd-3.0.0-ipv6-masquerade.patch
new file mode 100644
index 00000000000..47573e3f08a
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-3.0.0-ipv6-masquerade.patch
@@ -0,0 +1,85 @@
+From 5fdbfea671f75f869abeadd02a36bc941b25020f Mon Sep 17 00:00:00 2001
+From: Janik Rabe <info@janikrabe.com>
+Date: Tue, 17 Aug 2021 19:28:46 +0100
+Subject: [PATCH] Allow using masquerading without IPv6 support on Linux
+
+---
+ ChangeLog | 4 ++++
+ NEWS | 4 ++++
+ src/kernel/linux.c | 10 +++++++++-
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 8102669..09f8db6 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++2021-08-17 Janik Rabe <info@janikrabe.com>
++
++ * Allow using masquerading without IPv6 support on Linux.
++
+ 2021-08-16 Janik Rabe <info@janikrabe.com>
+
+ * Released as version 3.0.0.
+diff --git a/NEWS b/NEWS
+index bb64455..8820d3a 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,7 @@
++Unreleased changes
++
++ * Allow using masquerading without IPv6 support on Linux.
++
+ Changes in version 3.0.0
+
+ * Support for '--debug' is now included by default.
+diff --git a/src/kernel/linux.c b/src/kernel/linux.c
+index db0296c..f68e433 100644
+--- a/src/kernel/linux.c
++++ b/src/kernel/linux.c
+@@ -462,10 +462,12 @@ static int masq_ct_line(char *line,
+ in_addr_t remotem4;
+ in_addr_t localn4;
+ in_addr_t remoten4;
++#if WANT_IPV6
+ struct in6_addr localm6;
+ struct in6_addr remotem6;
+ struct in6_addr localn6;
+ struct in6_addr remoten6;
++#endif
+ u_int32_t nport_temp;
+ u_int32_t mport_temp;
+ u_int32_t masq_lport_temp;
+@@ -511,6 +513,8 @@ static int masq_ct_line(char *line,
+ sin_setv4(remoten4, &remoten_ss);
+
+ break;
++
++#if WANT_IPV6
+ case AF_INET6:
+ if (strcasecmp(family, "ipv6"))
+ return 1;
+@@ -527,9 +531,11 @@ static int masq_ct_line(char *line,
+ sin_setv6(&remoten6, &remoten_ss);
+
+ break;
++#endif
++
+ default:
+ debug("masq_ct_line: bad address family %d", faddr->ss_family);
+- return -1;
++ return 1;
+ }
+
+ masq_lport = (in_port_t) masq_lport_temp;
+@@ -561,8 +567,10 @@ static int masq_ct_line(char *line,
+ if (con_uid == MISSING_UID && faddr->ss_family == AF_INET)
+ con_uid = get_user4(htons(masq_lport), htons(masq_fport), laddr, &remotem_ss);
+
++#if WANT_IPV6
+ if (con_uid == MISSING_UID && faddr->ss_family == AF_INET6)
+ con_uid = get_user6(htons(masq_lport), htons(masq_fport), laddr, &remotem_ss);
++#endif
+
+ if (con_uid == MISSING_UID)
+ return -1;
diff --git a/net-misc/oidentd/oidentd-3.0.0-r1.ebuild b/net-misc/oidentd/oidentd-3.0.0-r1.ebuild
index 614fff09c55..3c1eea07ecf 100644
--- a/net-misc/oidentd/oidentd-3.0.0-r1.ebuild
+++ b/net-misc/oidentd/oidentd-3.0.0-r1.ebuild
@@ -28,6 +28,8 @@ BDEPEND="
sys-devel/flex
"
+PATCHES=( "${FILESDIR}/${P}-ipv6-masquerade.patch" )
+
src_prepare() {
sed -i '/ExecStart/ s|$| -u oidentd -g oidentd|' contrib/systemd/*.service || die
next reply other threads:[~2021-08-17 18:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 18:41 Conrad Kostecki [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-02 13:37 [gentoo-commits] repo/gentoo:master commit in: net-misc/oidentd/files/, net-misc/oidentd/ Arthur Zamarin
2020-02-17 18:38 Thomas Deutschmann
2019-02-03 14:53 Andreas Sturmlechner
2017-07-14 22:06 Michał Górny
2015-12-19 12:25 Christoph Mende
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1629225691.0c65bd4dd2f7001b8c521e06f5378e661a0d063b.conikost@gentoo \
--to=conikost@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox