summaryrefslogtreecommitdiff
path: root/net-firewall
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
commitb8c7370a682e4e29cda623222d17a790c01c3642 (patch)
treef6caa14689bd00a5760eadaa381ff41e50ef3c1b /net-firewall
parent8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff)
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/Manifest.gzbin4221 -> 4217 bytes
-rw-r--r--net-firewall/arno-iptables-firewall/Manifest4
-rw-r--r--net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.2a.ebuild107
-rw-r--r--net-firewall/arno-iptables-firewall/metadata.xml3
-rw-r--r--net-firewall/firewalld/Manifest2
-rw-r--r--net-firewall/firewalld/firewalld-2.1.1-r5.ebuild (renamed from net-firewall/firewalld/firewalld-2.1.1-r4.ebuild)3
-rw-r--r--net-firewall/ipset/Manifest1
-rw-r--r--net-firewall/ipset/files/ipset.initd-r6105
-rw-r--r--net-firewall/nftables/Manifest2
-rw-r--r--net-firewall/nftables/files/nftables-1.1.0-revert-firewalld-breaking-change.patch63
-rw-r--r--net-firewall/nftables/nftables-1.1.0-r1.ebuild232
11 files changed, 412 insertions, 110 deletions
diff --git a/net-firewall/Manifest.gz b/net-firewall/Manifest.gz
index a07469f63a92..8665fa1703b9 100644
--- a/net-firewall/Manifest.gz
+++ b/net-firewall/Manifest.gz
Binary files differ
diff --git a/net-firewall/arno-iptables-firewall/Manifest b/net-firewall/arno-iptables-firewall/Manifest
index 673eaf44f94d..e1e0dab42494 100644
--- a/net-firewall/arno-iptables-firewall/Manifest
+++ b/net-firewall/arno-iptables-firewall/Manifest
@@ -1,6 +1,8 @@
AUX arno-iptables-firewall 404 BLAKE2B 20ae4750d99c8edd3edf4f0e96354aa6a3f0df151bbbfe46f27fa3b1e0c8aaa5bdd7e3292b2e1fc1b5c735ae2b3d512117a5457b42593848829cc2808e7b6ec7 SHA512 3491c556150ac4c39447f17cb48caa2542c42c632d960f604ccdd475cbec239b8fec8523606c146427e644a929b2c5522f3c21a47712fd67880ac3815d3ab983
DIST arno-iptables-firewall-2.1.1.tar.gz 141076 BLAKE2B d3f78767a3ac447841aa01becfd73434cfddc9f56142d5c6ac86072527c17a30449434b8cddba74bb45f8234268ba589ab2ea932db462317a2dfb714f31f2450 SHA512 55494c8a214c0b2dacfef23170ea596bf9ecdfc73d1a6b2bd703183278569f68103eb63580d1b18cae97a9460b95373f0091bbf5decf275c80803a1331555d79
DIST arno-iptables-firewall-2.1.1a.tar.gz 141116 BLAKE2B db6a4b5bfc94d69bbc8f6eb6b15485ae030e62ff26b00aa88e0426fdc711dadfc641a3a3fe55ce1c35ab61900f2d2235fca3d7359879d7255e44c3b19f8bf13f SHA512 1af2bd82434a530d44d2a511ce7416d2c5387ae1fe215e0db47cb72d6517a64c7d4366bfed33e0446d48ed403d55b09306d34aa8528d666f088d9557632b5756
+DIST arno-iptables-firewall-2.1.2a.tar.gz 141918 BLAKE2B a70e218ba98a8683aacf28a72494b237925cb343bf55933944244d1927b5202e30dbcb46673d8ac3d7f084208270ae407f8eeb6155a7bfd4c6aecf2a9a392c52 SHA512 cabdcc23da99593f32638c1467c20e59b6c13b64e37863e2293cde945ad5cdacb330521abc917813de4e8e1224fe44735dbb71edc56dcb821c3bd8a1bef01604
EBUILD arno-iptables-firewall-2.1.1.ebuild 2665 BLAKE2B 41e15cc68ba3ba5b70a883e0f75060f578ebe3a47b28493efe8e71b99d621b4095d47ca63ed3041e4da02c2ed8e29fe140556edca41550f09d26bef90b8b3524 SHA512 14655be7f1370924e8441e5a5858ddc162009b64890da86036c722a212a0bafd7b4becb6a1ba38cd139c631cc78ce51f757a26e0bf2e643b7d6cf63e5a131437
EBUILD arno-iptables-firewall-2.1.1a.ebuild 2689 BLAKE2B 1a7896d442e6c540d47013b9f916fa99921ad5db27eee6b970021ec1c09e5c66bd84e9ffe03bd51687b560b70ce9a1ba783ec6abc5b6da240d7eb28e32102255 SHA512 76f9a2def0aa1358e702dd2dbc2da1485231f943c9cac2e7c02734111a9fb0d19d7d6f5d27ecc06cf31bd839743e45ec31d55d453e7a9707eb62b91c40d9cfdb
-MISC metadata.xml 558 BLAKE2B 41f2473944ab7e098b2c87fadb72a8f71b6411fc1a1a957b0f97b6802d58d5fbdd5c3b533746803a05617bd8871bb68687d7a3e59ca61fcfc134aedb12f7727f SHA512 3a054d186337787b9c601f7e100983ca9519d7b097dc79b065b9422f1ccb522392028e898739d33cf84d9a30fa8af131040e955a9e3c59278ab2cce7fd849f62
+EBUILD arno-iptables-firewall-2.1.2a.ebuild 2691 BLAKE2B 3e2cfff2416de36bed11bd93ce79df861e932a8c0190f2d1478a6db38e34c2d8739d631d704d35ef78db2c253388a9900d4e53de759282cbf91acaa755ed89bf SHA512 5f5335280b16c14e532ea69da7b340113af2226421f2875cc97ba43fd02a12df559f7e934708f708b54e93a53aaab422b06bbb7b8ea50443c166646eba4914a0
+MISC metadata.xml 649 BLAKE2B b47f994e920d253fd0e349c29bf6db440b8ad502e7195b1cb735ffa192141f67008cbf69a7c584ba6ab0f8f764fa1e558687a891d9119ffa089fca2d5d4f4e4b SHA512 270fbe18eff171afc0fe968ea0ba1722c1dda948e1308e5c2e1c5484b85785a7dc0c2a08b5f75af75a303bd70969c24c53caec7ff4f6534c56699af34f8c8350
diff --git a/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.2a.ebuild b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.2a.ebuild
new file mode 100644
index 000000000000..f4a281bd6eb5
--- /dev/null
+++ b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.2a.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit readme.gentoo-r1 systemd
+
+DESCRIPTION="Arno's iptables firewall script"
+HOMEPAGE="https://rocky.eld.leidenuniv.nl https://github.com/arno-iptables-firewall/aif"
+
+SRC_URI="https://github.com/${PN}/aif/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/aif-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins rsyslog"
+
+RDEPEND="
+ net-firewall/ipset
+ net-firewall/iptables
+ sys-apps/coreutils
+ sys-apps/iproute2
+ plugins? ( net-dns/bind-tools )
+"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="You will need to configure /etc/${PN}/firewall.conf
+before using this package. To start the script, run:
+
+/etc/init.d/${PN} start (for OpenRC)
+systemctl start ${PN} (for systemd)
+
+If you want to start this script at boot, run:
+
+rc-update add ${PN} default (for OpenRC)
+systemctl enable ${PN} (for systemd)"
+
+src_prepare() {
+ sed -i -e 's:/usr/local/share/:/usr/libexec/:' \
+ bin/"${PN}" share/"${PN}"/environment || die "Sed failed!"
+ sed -i -e 's:/usr/local/sbin/:/usr/sbin/:' \
+ lib/systemd/system/"${PN}.service" || die "Sed failed!"
+ eapply_user
+}
+
+src_install() {
+ insinto /etc/"${PN}"
+ doins etc/"${PN}"/firewall.conf
+ doins etc/"${PN}"/custom-rules
+
+ doinitd "${FILESDIR}/${PN}"
+ systemd_dounit lib/systemd/system/"${PN}.service"
+
+ dobin bin/arno-fwfilter
+ dosbin bin/"${PN}"
+
+ insinto /usr/libexec/"${PN}"
+ doins share/"${PN}"/environment
+
+ exeinto /usr/libexec/"${PN}"
+ doexe share/"${PN}"/aif-job-execute
+ doexe share/"${PN}"/aif-job-processor
+
+ insinto /etc/logrotate.d
+ doins etc/logrotate.d/"${PN}"
+
+ dodoc CHANGELOG README
+ readme.gentoo_create_doc
+
+ if use plugins
+ then
+ insinto /etc/"${PN}"/plugins
+ doins etc/"${PN}"/plugins/*
+
+ insinto /usr/libexec/"${PN}"/plugins
+ doins share/"${PN}"/plugins/*.plugin
+ doins share/"${PN}"/plugins/adaptive-ban-helper
+ doins share/"${PN}"/plugins/dyndns-host-open-helper
+ doins share/"${PN}"/plugins/parasitic-net-helper
+ doins share/"${PN}"/plugins/traffic-accounting-helper
+
+ exeinto /usr/libexec/"${PN}"/plugins
+ doexe share/"${PN}"/plugins/traffic-accounting-log-rotate
+ doexe share/"${PN}"/plugins/traffic-accounting-show
+
+ docinto plugins
+ dodoc share/"${PN}"/plugins/*.CHANGELOG
+ fi
+
+ if use rsyslog
+ then
+ insinto /etc/rsyslog.d
+ newins etc/rsyslog.d/"${PN}".conf 20-"${PN}".conf
+ fi
+
+ doman share/man/man1/arno-fwfilter.1 \
+ share/man/man8/"${PN}".8
+}
+
+pkg_postinst() {
+ ewarn "When you stop this script, all firewall rules are flushed!"
+ ewarn "Make sure to not use multiple firewall scripts simultaneously"
+ ewarn "unless you know what you are doing!"
+ readme.gentoo_print_elog
+}
diff --git a/net-firewall/arno-iptables-firewall/metadata.xml b/net-firewall/arno-iptables-firewall/metadata.xml
index 6f83b9325a36..8bb444d413cc 100644
--- a/net-firewall/arno-iptables-firewall/metadata.xml
+++ b/net-firewall/arno-iptables-firewall/metadata.xml
@@ -9,6 +9,9 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
+ <upstream>
+ <remote-id type="github">arno-iptables-firewall/aif</remote-id>
+ </upstream>
<use>
<flag name="plugins">Install optional plugins</flag>
<flag name="rsyslog">Install configuration snippet for <pkg>app-admin/rsyslog</pkg></flag>
diff --git a/net-firewall/firewalld/Manifest b/net-firewall/firewalld/Manifest
index 1dc8c1b038c5..543596254ffc 100644
--- a/net-firewall/firewalld/Manifest
+++ b/net-firewall/firewalld/Manifest
@@ -2,5 +2,5 @@ AUX firewalld-systemd-service.patch 769 BLAKE2B fbd8392b6f542413ae2896f8830faa0d
AUX firewalld.init 250 BLAKE2B 1c0f690e24313037b801902aa772a9d1cb6889a05f142bc3d84602002ef053cd059b5193983f9fe6d89065a070a566a6a9ba8212a092435953ebed80ea7c7b40 SHA512 457cda01449f38563e98e1db937fe1c50745eab91797f52687e3ab9f5d94dd42d129740ae6669e99666a3f096d631dd3a44e66010b638b31b9c6ba798362403e
AUX firewalld.service 581 BLAKE2B b4eb7549305da68bc53f913d5d0a3ff2595e8e482ed2a474ede645f33b8192e142cd1aa964c5c1dcf8a7c336c68d494ee13421ec7566312a4f89330c236cab9c SHA512 b81fb8414619b3661985cbac001a47c76d76b13eebe421919a838fa0396e6470a3109e0d20d88f423ff43b6e48c0537467125a85bf8939ef0ab6ded4d4829b03
DIST firewalld-2.1.1.tar.bz2 1315222 BLAKE2B 064abfae1f2f1c5a63bbbbbec3357aa6e63936818fa2020ca882d1b834736b3735a32b0ab318e6de78b6f785cb4da0ee4e299956c922d9dbf6e7bd442e9bb2d6 SHA512 383e5ea3d451a28241e5a76f8d0efeeb8319663bdc5f680b68c5156ddb5145fac766a9ee9521c4af27b1df82861ca6f68ee81c0588b1dd6c4f6d4e4f5ca8fee1
-EBUILD firewalld-2.1.1-r4.ebuild 5433 BLAKE2B 15b345a2b2bf27356fe66072a322c4d0ffa3de1d66fa9e43395fbb34cb44d5b7f034be17c0ae14f2cfe6893811372b4a29b9a48bbe4e9bd1f4b12761a3cd2b12 SHA512 88da625f778bb9e64b7d0aeb6ec04f25729a92ab2c9143b450cea31cefc44facc16a79f85b888e1480af1a4a1ed831b379cb6f13912b874ac9a972ccaa6d492f
+EBUILD firewalld-2.1.1-r5.ebuild 5356 BLAKE2B 3d2ca4ce68b4c40b081c30780af9c32df51c9f857315c2b11bfdef56d67e5708d9569e0405d689499248dee395a83583e4a758879e42f5207b955ba08956738c SHA512 80266f187abd46119dbe2edcbc7b6c7f85e92cb5547652610a23bca833121d73859bf98a0b4f1dbaec5d313eff9680f3efce6e52b139050d05d05b7f303c17b7
MISC metadata.xml 671 BLAKE2B 69c4bda7cc74a243aa1738bed90d16a3bc2c2085f6c0718becc7797a68da63035ef4d4f5e59c0583987d54032c163df6052d012fb7ca49026ca7259088793d33 SHA512 dd2d482251a4e33cb12ba324e1a21b4758f82de83c0cf83d5fa6259444c272360b47c5666e596103eba4703183fc9864a6bbb07a254aba67146b89d9870e9bbe
diff --git a/net-firewall/firewalld/firewalld-2.1.1-r4.ebuild b/net-firewall/firewalld/firewalld-2.1.1-r5.ebuild
index 5c6d72725da4..e1ff652b6c61 100644
--- a/net-firewall/firewalld/firewalld-2.1.1-r4.ebuild
+++ b/net-firewall/firewalld/firewalld-2.1.1-r5.ebuild
@@ -19,7 +19,6 @@ IUSE="gui +nftables +iptables selinux test"
RESTRICT="!test? ( test ) test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-# <nftables-1.1.0: https://github.com/firewalld/firewalld/issues/1366
RDEPEND="
${PYTHON_DEPS}
|| ( >=sys-apps/openrc-0.11.5 sys-apps/openrc-navi sys-apps/systemd )
@@ -36,7 +35,7 @@ RDEPEND="
net-firewall/iptables[ipv6(+)]
net-firewall/ebtables
net-firewall/ipset
- nftables? ( <net-firewall/nftables-1.1.0[xtables(+)] )
+ nftables? ( net-firewall/nftables[xtables(+)] )
)
selinux? ( sec-policy/selinux-firewalld )
"
diff --git a/net-firewall/ipset/Manifest b/net-firewall/ipset/Manifest
index 74379b665b6a..2c1aaaaa4106 100644
--- a/net-firewall/ipset/Manifest
+++ b/net-firewall/ipset/Manifest
@@ -2,7 +2,6 @@ AUX ipset-7.22-argv-bounds.patch 1132 BLAKE2B 44edaaf8858c386eaa8d98a67ab41a8bc2
AUX ipset-7.22-asan-buffer-overflow.patch 2589 BLAKE2B 09714f315561ae0cb11a268364254b334e6f776dd66ca2cdffac1335e70c9839c765e85f1947f6d58156179f033e3e2e3421f62ffea65fc0816f13bd3db377c3 SHA512 05f99044eb6285683945e2ba4b0fa973c01239bb97e63f0c492ca8f36927054e21040e42192188391fcb9342ee615ab28f4346b894afa2e7958e0bcd74143288
AUX ipset-bash-completion.patch 502 BLAKE2B 31d3ebfe59506f24e74c45912aabd87d853643d0eebf7e88a260964cbed5ff44cae870d9ba47879f81bd9f4bc784e7f28fb80e144f72acfcf2caff02abcea83f SHA512 682d2dfcc7e115824a9883ba58118a27c0075bea08444f74c9a12678ac3dc10592f9f7cafa55dfa96969f89b64300d58507630210050fb2f8237b917118f2418
AUX ipset.confd-r1 666 BLAKE2B 852963fd27d11f58305f33cc9be84d5eabde73f5af4924d97ad188505fa64b2c75f31ece180e2992d275738305b7a731afc8b911314a9f202320c0c61053fc9b SHA512 6020665ba30fc9efa7c16714c1ff7a0961153175b70ca5817f72c4123537e0ff9a977b8ca71914ef8b49d431601b73275b2ab6f848d521b53680b0cd7bcaca82
-AUX ipset.initd-r6 3386 BLAKE2B 1b3c0de0cc45fe80d3e0ba8a90fb2433ec3a6c2df38d50030cafea0b67562644918186e82e1c92a314f8e75939a0302a1574ae78fedbc9da9016ac3d0fd82e20 SHA512 ca821d2d22826d10f87e0c318b52faf10a339174f2ab27fb427b87f41b824ea8b74523b776465dd43edd1fa3cb311b11a6c9972f1d24f007ad60b87895860d2d
AUX ipset.initd-r7 4175 BLAKE2B 8a9936ffc57ffcf25ed45769d6cb76cecc0de66919597a90e440156d7cf938ed5ffc6b71aed634cbc473c866ad542d9eb388e3d91ebd697949ceaa763ce24e80 SHA512 d208ee673119182ee515c25263704e0e5bbae1aefbf5ec469ca71f3e70e14900c5a2d8f0171b3a5754afbcc464d30a760d0e413b1b66ccb0d3805327fdd66b65
AUX ipset.systemd-r1 492 BLAKE2B 78fd7b122e0fe08b36d36e736d18b7a5f0bf1aa78802f1bdc7abf69ad2ef9c0bcfb22ae84f8f6489aee6c147ee3c0be7ebfa600712bf6169940802466daf68ba SHA512 6574e48ce6b3c4f45122a8b387746793ceda62f68ec8b0f3f6f949f5650ab557f3f7eb75699e36d5bf04efbf39dc17e030cc44ea9d97891578d4c909669e6eb7
DIST ipset-7.22.tar.bz2 694069 BLAKE2B 9daaff54adb6f9daf69cd7dabbd9134d8fcf8cd7f8ef0c52296961579ad3c8202087158a01664228eff70356ba97f77ec61abbab7c7ce323112fbdc32abd661b SHA512 e375a9110eb7974480147c57eb2cff4bdd03c7704cdae006a3d254cc80fada587aa8aee25a86f7cab29db83f5e283c5f9a47a314297317660ebba5097f623d79
diff --git a/net-firewall/ipset/files/ipset.initd-r6 b/net-firewall/ipset/files/ipset.initd-r6
deleted file mode 100644
index 949bdad76044..000000000000
--- a/net-firewall/ipset/files/ipset.initd-r6
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="save"
-extra_started_commands="reload"
-
-IPSET_SAVE=${IPSET_SAVE:-/var/lib/ipset/rules-save}
-
-depend() {
- before iptables ip6tables
-}
-
-checkconfig() {
- if [ ! -f "${IPSET_SAVE}" ] ; then
- eerror "Not starting ${SVCNAME}. First create some rules then run:"
- eerror "/etc/init.d/${SVCNAME} save"
- return 1
- fi
- return 0
-}
-
-start() {
- checkconfig || return 1
- ebegin "Loading ipset session"
- ipset restore < "${IPSET_SAVE}"
- eend $?
-}
-
-stop() {
- # check if there are any references to current sets
-
- if ! ipset list | gawk '
- ($1 == "References:") { refcnt += $2 }
- ($1 == "Type:" && $2 == "list:set") { set = 1 }
- (scan) { if ($0 != "") setcnt++; else { scan = 0; set = 0 } }
- (set && $1 == "Members:") {scan = 1}
- END { if ((refcnt - setcnt) > 0) exit 1 }
- '; then
- eerror "ipset is in use, can't stop"
- return 1
- fi
-
- if [ "${SAVE_ON_STOP}" = "yes" ] ; then
- save || return 1
- fi
-
- ebegin "Removing kernel IP sets"
- ipset flush
- ipset destroy
- eend $?
-}
-
-reload() {
- ebegin "Reloading ipsets"
-
- # Loading sets from a save file is only additive (there is no
- # automatic flushing or replacing). And, we can not remove sets
- # that are currently used in existing iptables rules.
- #
- # Instead, we create new temp sets for any set that is already
- # in use, and then atomically swap them into place.
- #
- # XXX: This does not clean out previously used ipsets that are
- # not in the new saved policy--it can't, because they may still
- # be referenced in the current iptables rules.
-
-
- # Build a list of all currently used sets (if any).
- running_ipset_list=$(ipset save | gawk '/^create/{printf "%s ",$2}')
- running_ipset_list="${running_ipset_list% }"
-
- # Check the configured suffix, and make sure there are no collisions
- if test -z "${TEMP_SUFFIX}" ; then
- eend 1 "TEMP_SUFFIX cannot be empty"
- return 1
- elif echo "$running_ipset_list" | grep -q -E "${TEMP_SUFFIX}( |$)" ; then
- eend 1 "Existing set(s) match TEMP_SUFFIX pattern ('${TEMP_SUFFIX}'), cannot continue"
- return 1
- fi
-
- # Build a regular expression that matches those set names.
- running_ipset_list_regex="$(echo "$running_ipset_list" | tr -s ' ' '|' )"
-
- # Load up sets from the save file, but rename any set that already
- # exists to a temporary name that we will swap later.
- if ! cat ${IPSET_SAVE} | sed -r "s/^(create|add) (${running_ipset_list_regex}) /\1 \2${TEMP_SUFFIX} /" | ipset restore ; then
- eend $? "Failed to load new ipsets"
- fi
-
- # Now for every set name that currently exists, atomically swap it
- # with the temporary new one we created, and then destroy the old set.
- for ipset_name in ${running_ipset_list} ; do
- ipset swap ${ipset_name} ${ipset_name}${TEMP_SUFFIX} || eend $? "Failed to swap in new ipset $ipset_name"
- ipset destroy ${ipset_name}${TEMP_SUFFIX} || eend $? "Failed to delete obsolete ipset ${ipset_name}${TEMP_SUFFIX}"
- done
- eend 0
-}
-
-save() {
- ebegin "Saving ipset session"
- checkpath --file --mode 0600 "${IPSET_SAVE}"
- ipset -output save list > "${IPSET_SAVE}"
- eend $?
-}
diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest
index 9b298cb4000e..21e79f6d64ea 100644
--- a/net-firewall/nftables/Manifest
+++ b/net-firewall/nftables/Manifest
@@ -1,6 +1,7 @@
AUX libexec/nftables-mk.sh 1070 BLAKE2B 30d8109d74e7d8c4f51c753f676f91a1902ad42f6d68662f1191ff73d2a43a1bf49fb795f3763705f8aeb0a4f22cab0006a943e01adb188f1ef9eb05125dfdbd SHA512 a14e48f014f75c7e611bf2a653d9760804754febd1ae4543f78abbfbe60c79f5aa07c5fd53fe26bb74b48fcb8cb8aa78274771212e41c42db031e8c8ba7e81d2
AUX libexec/nftables.sh 3665 BLAKE2B 74362a4425e974e74e7b895980002f0ded2ecbb4731bbf956edb56ffb9f1ad394802c4eeab3af3735eba4d8e71572a5663e564ce4e7fad76c9715043b90c1b43 SHA512 6cb1ac0928ae2da5c69764d45c52a661a6d72698bb9edd6a603580d2f9bd82b59f2a2661e7569ade3a3b729459d115004f251ad6a5eac8cdf1d38c65bfa9349e
AUX man-pages/gen-manpages.bash 1797 BLAKE2B c93cc311570abd674a12eb88711cf01664f437b8dc0fb4de36194f36671d92c35e04fcff6c56adcb0e642f089169f63ef063736398584e5e7ce799bf55acf2ff SHA512 ea3291412ce13d9dd463403fcc11c665c9de63edaabdecaf55e051b52b0ff845c9c7d63a6c4c08e4d2d94428815fe11daf9b7390081b4e9de4774e188b9ea677
+AUX nftables-1.1.0-revert-firewalld-breaking-change.patch 1919 BLAKE2B 3234b278522a919b8e5afafae9749360edfc224f5f45fd3f0a816d8ae8ddfa3798327610add8d152129e1b36f2473549f2245793685c33db942aff0e61b0be34 SHA512 eb041be1770da615af24ef573ae38fcdffb1dcf3b9cf7584514e4e67d2a24a0525b4ad04ea35cf568402a5a074a5cfe313c0bd7d38405940267be49f81f9e4e2
AUX nftables-mk.confd 899 BLAKE2B f4c3d82fbae87fb0d755af786a98db591b6a667cf33660ba9275ada2e6417fad1899a7f29762f23c112fc5c9e178bc7590c3b2ba26617853c3577917bd7d3edf SHA512 505ed05674a04367f1a3d5cf6447596ad1c3b2e9c920697f12f58a20d94c2a39b0041bb4911678511c4548566a69d964661d4afc3e7e27997943b875f204c602
AUX nftables-mk.init-r1 1970 BLAKE2B 9ece7da364eac76ef2ac401f4cc3ed558e926e8f07ab43f084de819098e9543bda0a9a8d40375e4e01dd6e53b92d744acf8f3caaeab1c3678ca84b1f48d59685 SHA512 9f1e491ba5fd8a1173eb055bfa5a0de3c040c158e7d54848fcd373a5f4c4041df6fb9ddc5b0e8fdfd78243665c627b8767816bcf94dd142b441b21227206fef3
AUX nftables.confd 655 BLAKE2B 5512be1edd43e270941de3d9b66fda69e4afd7c7e6e970b232a044c2fd64f8e50b9b55a4fe670174c3eabf3d176ee0158c1043baec4b76b0802e7e97bc862fcf SHA512 8370abcdc89fcd9da5dc7d1620be6afb4633b8bcd0a8a120b464cc1a7e1fab6f34956c293da3f6d3cbe1f7a2e03038fd0c94a614137ae5657d29ffdb5f3fa144
@@ -11,6 +12,7 @@ DIST nftables-1.0.9.tar.xz.sig 566 BLAKE2B d4bb0a1f629d2950753799fba18f6c3ce50e5
DIST nftables-1.1.0.tar.xz 1057672 BLAKE2B cc876d9ba344480a2f5a12811206356d9edbd4a95d29e8127f43864a1b4e2ae9bc88a6d07f0d36469dfed190c5822fd6a7c69b6a9028fbb0bc1ec254e76083d9 SHA512 0b0c6789b7d987289b9770ea2d26e640c50bc7f300685476c4fc367b5ad3d6980fca63b8fe701f727fb3a94328eb7dc560ed5745b5ce44f171022de5714d3a86
DIST nftables-1.1.0.tar.xz.sig 566 BLAKE2B 556287b40ad6f82d229ae18910ec2008c3168c7088e7149f8b5e80ca9983b90ec202cf01838c80e973845dd565f4f13a454d6dc99030a3f9cede6c33929da07d SHA512 1b3a42a76b378373c8a21b77aaf9c1fc57402360d49d56b22f02c50bef969b1f6867a4d40bda24b2dd1a0dfcf7148893938a7eea84ff8cc67d9edcd6b9b62bb4
EBUILD nftables-1.0.9.ebuild 6478 BLAKE2B 67415f3877ba9d24eb995bb97f4bd93520d9fc70d7fde48b743779879886aad83d4cb3b5bcebbb3b63d27038d2e556c99b01979e539db1054058759b3830a663 SHA512 cd4ee3af488cc918cead56406f54a5b74dc54e3aabab3e63e7b704922add8cb652d509ea87b6c3227455bf0805b12fb328a94992062cc09c3ed9710be4bc7b85
+EBUILD nftables-1.1.0-r1.ebuild 6570 BLAKE2B a4fb963a29cfedf3a596377479ad8419b3609ada67362d499ab0a0ff7150a2effa9c23f662c199d808c878256b89b3d5526b8f3fe7ccf1950ba39383ebbb6435 SHA512 5ecd1232140316d7b9b9fe07c2ab44e702c099f11b62f7a5c21f12a253bdbddacd52d8a1d4573d5917eb4bde470c35c4841bd5f1032a0eb9d47c009a01f1efd6
EBUILD nftables-1.1.0.ebuild 6488 BLAKE2B eb5ca8ea1b6bd0ef187bc45aed113b0e24e691d958cd08c32b5f67bdbd2b22b25fbc438f77f5c54cd1e87cdda5b89e48a2d86dc58d04520920bcca09bb0ad0f6 SHA512 47848d0eb477c62ecc3250aa0bc2cfc20b4ec5226e377e3f533ee2e4c79189e2beb41ef77d424a8258bab8b1401cadff837fc327fa20eaa9faad00b2c9d34e05
EBUILD nftables-9999.ebuild 6488 BLAKE2B eb5ca8ea1b6bd0ef187bc45aed113b0e24e691d958cd08c32b5f67bdbd2b22b25fbc438f77f5c54cd1e87cdda5b89e48a2d86dc58d04520920bcca09bb0ad0f6 SHA512 47848d0eb477c62ecc3250aa0bc2cfc20b4ec5226e377e3f533ee2e4c79189e2beb41ef77d424a8258bab8b1401cadff837fc327fa20eaa9faad00b2c9d34e05
MISC metadata.xml 684 BLAKE2B 96044107a07596178b59f3d4bed0433e06eb74693fafcc1a8c20468e02626814ba1544bba54c64367e43a126463b0f3b33e340476aff15db934467e8b9d46bf7 SHA512 fa4c9cadddccda4217837a892fbec3e1b984fb18a4d11d5536f22724d2455724eb59c5cc06da5830fb28bb48cb2d01374fdc56e216296c695c678af28390392a
diff --git a/net-firewall/nftables/files/nftables-1.1.0-revert-firewalld-breaking-change.patch b/net-firewall/nftables/files/nftables-1.1.0-revert-firewalld-breaking-change.patch
new file mode 100644
index 000000000000..0cc23d61fb8f
--- /dev/null
+++ b/net-firewall/nftables/files/nftables-1.1.0-revert-firewalld-breaking-change.patch
@@ -0,0 +1,63 @@
+https://git.netfilter.org/nftables/commit/?id=93560d0117639c8685fc287128ab06dec9950fbd
+https://github.com/firewalld/firewalld/issues/1366
+https://lore.kernel.org/netfilter-devel/Zp7FqL_YK3p_dQ8B@egarver-mac/
+
+From 93560d0117639c8685fc287128ab06dec9950fbd Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Wed, 24 Jul 2024 09:38:33 +0200
+Subject: Revert "cache: recycle existing cache with incremental updates"
+
+This reverts commit e791dbe109b6dd891a63a4236df5dc29d7a4b863.
+
+Eric Garver reported two issues:
+
+- index with rule breaks, because NFT_CACHE_REFRESH is missing.
+- simple set updates.
+
+Moreover, the current process could populate the cache with objects for
+listing commands (no generation ID is bumped), while another process
+could update the ruleset. Leading to a inconsistent cache due to the
+genid + 1 check.
+
+This optimization needs more work and more tests for -i/--interactive,
+revert it.
+
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+--- a/src/cache.c
++++ b/src/cache.c
+@@ -1184,21 +1184,9 @@ static bool nft_cache_needs_refresh(struct nft_cache *cache, unsigned int flags)
+ (flags & NFT_CACHE_REFRESH);
+ }
+
+-static bool nft_cache_is_updated(struct nft_cache *cache, unsigned int flags,
+- uint16_t genid)
++static bool nft_cache_is_updated(struct nft_cache *cache, uint16_t genid)
+ {
+- if (!genid)
+- return false;
+-
+- if (genid == cache->genid)
+- return true;
+-
+- if (genid == cache->genid + 1) {
+- cache->genid++;
+- return true;
+- }
+-
+- return false;
++ return genid && genid == cache->genid;
+ }
+
+ bool nft_cache_needs_update(struct nft_cache *cache)
+@@ -1223,7 +1211,7 @@ replay:
+ genid = mnl_genid_get(&ctx);
+ if (!nft_cache_needs_refresh(cache, flags) &&
+ nft_cache_is_complete(cache, flags) &&
+- nft_cache_is_updated(cache, flags, genid))
++ nft_cache_is_updated(cache, genid))
+ return 0;
+
+ if (cache->genid)
+--
+cgit v1.2.3
+
diff --git a/net-firewall/nftables/nftables-1.1.0-r1.ebuild b/net-firewall/nftables/nftables-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..eb927df4997e
--- /dev/null
+++ b/net-firewall/nftables/nftables-1.1.0-r1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/netfilter.org.asc
+inherit edo linux-info distutils-r1 systemd verify-sig
+
+DESCRIPTION="Linux kernel firewall, NAT and packet mangling tools"
+HOMEPAGE="https://netfilter.org/projects/nftables/"
+
+if [[ ${PV} =~ ^[9]{4,}$ ]]; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://git.netfilter.org/${PN}"
+ BDEPEND="app-alternatives/yacc"
+else
+ SRC_URI="
+ https://netfilter.org/projects/nftables/files/${P}.tar.xz
+ verify-sig? ( https://netfilter.org/projects/nftables/files/${P}.tar.xz.sig )
+ "
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-netfilter )"
+fi
+
+# See COPYING: new code is GPL-2+, existing code is GPL-2
+LICENSE="GPL-2 GPL-2+"
+SLOT="0/1"
+IUSE="debug doc +gmp json libedit python +readline static-libs test xtables"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=net-libs/libmnl-1.0.4:=
+ >=net-libs/libnftnl-1.2.7:=
+ gmp? ( dev-libs/gmp:= )
+ json? ( dev-libs/jansson:= )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:= )
+ xtables? ( >=net-firewall/iptables-1.6.1:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND+="
+ app-alternatives/lex
+ virtual/pkgconfig
+ doc? (
+ app-text/asciidoc
+ >=app-text/docbook2X-0.8.8-r4
+ )
+ python? ( ${DISTUTILS_DEPS} )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ libedit? ( !readline )
+"
+
+PATCHES=(
+ "${FILESDIR}"/nftables-1.1.0-revert-firewalld-breaking-change.patch
+)
+
+src_prepare() {
+ default
+
+ if [[ ${PV} =~ ^[9]{4,}$ ]] ; then
+ eautoreconf
+ fi
+
+ if use python; then
+ pushd py >/dev/null || die
+ distutils-r1_src_prepare
+ popd >/dev/null || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --sbindir="${EPREFIX}"/sbin
+ $(use_enable debug)
+ $(use_enable doc man-doc)
+ $(use_with !gmp mini_gmp)
+ $(use_with json)
+ $(use_with libedit cli editline)
+ $(use_with readline cli readline)
+ $(use_enable static-libs static)
+ $(use_with xtables)
+ )
+
+ econf "${myeconfargs[@]}"
+
+ if use python; then
+ pushd py >/dev/null || die
+ distutils-r1_src_configure
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ pushd py >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
+ fi
+}
+
+src_test() {
+ emake check
+
+ if [[ ${EUID} == 0 ]]; then
+ edo tests/shell/run-tests.sh -v
+ else
+ ewarn "Skipping shell tests (requires root)"
+ fi
+
+ if use python; then
+ pushd tests/py >/dev/null || die
+ distutils-r1_src_test
+ popd >/dev/null || die
+ fi
+}
+
+python_test() {
+ if [[ ${EUID} == 0 ]]; then
+ edo "${EPYTHON}" nft-test.py
+ else
+ ewarn "Skipping Python tests (requires root)"
+ fi
+}
+
+src_install() {
+ default
+
+ if ! use doc && [[ ! ${PV} =~ ^[9]{4,}$ ]]; then
+ pushd doc >/dev/null || die
+ doman *.?
+ popd >/dev/null || die
+ fi
+
+ # Do it here instead of in src_prepare to avoid eautoreconf
+ # rmdir lets us catch if more files end up installed in /etc/nftables
+ dodir /usr/share/doc/${PF}/skels/
+ mv "${ED}"/etc/nftables/osf "${ED}"/usr/share/doc/${PF}/skels/osf || die
+ rmdir "${ED}"/etc/nftables || die
+
+ exeinto /usr/libexec/${PN}
+ newexe "${FILESDIR}"/libexec/${PN}-mk.sh ${PN}.sh
+ newconfd "${FILESDIR}"/${PN}-mk.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}-mk.init-r1 ${PN}
+ keepdir /var/lib/nftables
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service
+
+ if use python ; then
+ pushd py >/dev/null || die
+ distutils-r1_src_install
+ popd >/dev/null || die
+ fi
+
+ find "${ED}" -type f -name "*.la" -delete || die
+}
+
+pkg_preinst() {
+ local stderr
+
+ # There's a history of regressions with nftables upgrades. Perform a
+ # safety check to help us spot them earlier. For the check to pass, the
+ # currently loaded ruleset, if any, must be successfully evaluated by
+ # the newly built instance of nft(8).
+ if [[ -n ${ROOT} ]] || [[ ! -d /sys/module/nftables ]] || [[ ! -x /sbin/nft ]]; then
+ # Either nftables isn't yet in use or nft(8) cannot be executed.
+ return
+ elif ! stderr=$(umask 177; /sbin/nft -t list ruleset 2>&1 >"${T}"/ruleset.nft); then
+ # Report errors induced by trying to list the ruleset but don't
+ # treat them as being fatal.
+ printf '%s\n' "${stderr}" >&2
+ elif [[ ${stderr} == *"is managed by iptables-nft"* ]]; then
+ # Rulesets generated by iptables-nft are special in nature and
+ # will not always be printed in a way that constitutes a valid
+ # syntax for ntf(8). Ignore them.
+ return
+ elif set -- "${ED}"/usr/lib*/libnftables.so;
+ ! LD_LIBRARY_PATH=${1%/*} "${ED}"/sbin/nft -c -f -- "${T}"/ruleset.nft
+ then
+ eerror "Your currently loaded ruleset cannot be parsed by the newly built instance of"
+ eerror "nft. This probably means that there is a regression introduced by v${PV}."
+ eerror "(To make the ebuild fail instead of warning, set NFTABLES_ABORT_ON_RELOAD_FAILURE=1.)"
+ if [[ -n ${NFTABLES_ABORT_ON_RELOAD_FAILURE} ]] ; then
+ die "Aborting because of failed nft reload!"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ local save_file
+ save_file="${EROOT}"/var/lib/nftables/rules-save
+
+ # In order for the nftables-restore systemd service to start
+ # the save_file must exist.
+ if [[ ! -f "${save_file}" ]]; then
+ ( umask 177; touch "${save_file}" )
+ elif [[ $(( "$( stat --printf '%05a' "${save_file}" )" & 07177 )) -ne 0 ]]; then
+ ewarn "Your system has dangerous permissions for ${save_file}"
+ ewarn "It is probably affected by bug #691326."
+ ewarn "You may need to fix the permissions of the file. To do so,"
+ ewarn "you can run the command in the line below as root."
+ ewarn " 'chmod 600 \"${save_file}\"'"
+ fi
+
+ if has_version 'sys-apps/systemd'; then
+ elog "If you wish to enable the firewall rules on boot (on systemd) you"
+ elog "will need to enable the nftables-restore service."
+ elog " 'systemctl enable ${PN}-restore.service'"
+ elog
+ elog "If you are creating firewall rules before the next system restart"
+ elog "the nftables-restore service must be manually started in order to"
+ elog "save those rules on shutdown."
+ fi
+
+ if has_version 'sys-apps/openrc'; then
+ elog "If you wish to enable the firewall rules on boot (on openrc) you"
+ elog "will need to enable the nftables service."
+ elog " 'rc-update add ${PN} default'"
+ elog
+ elog "If you are creating or updating the firewall rules and wish to save"
+ elog "them to be loaded on the next restart, use the \"save\" functionality"
+ elog "in the init script."
+ elog " 'rc-service ${PN} save'"
+ fi
+}