diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-18 11:05:42 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-18 11:05:42 +0100 |
commit | 1426dfeb15e4d49cb4238c6cf37455a6130cd83f (patch) | |
tree | 9f9734bcdc280108e52d753b3c57234371772c3c /net-firewall | |
parent | 836586553c510ee2dd91e2ecd7676fe432c1f1a4 (diff) |
gentoo auto-resync : 18:09:2023 - 11:05:42
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/Manifest.gz | bin | 4386 -> 4384 bytes | |||
-rw-r--r-- | net-firewall/iptables/Manifest | 2 | ||||
-rw-r--r-- | net-firewall/iptables/files/iptables-1.8.9-fix-checking-existence-of-rule.patch | 34 | ||||
-rw-r--r-- | net-firewall/iptables/iptables-1.8.9-r1.ebuild | 181 |
4 files changed, 217 insertions, 0 deletions
diff --git a/net-firewall/Manifest.gz b/net-firewall/Manifest.gz Binary files differindex 55a67b94515b..a705fdcfd040 100644 --- a/net-firewall/Manifest.gz +++ b/net-firewall/Manifest.gz diff --git a/net-firewall/iptables/Manifest b/net-firewall/iptables/Manifest index c28ac9d5220e..40cfedbb11bf 100644 --- a/net-firewall/iptables/Manifest +++ b/net-firewall/iptables/Manifest @@ -5,6 +5,7 @@ AUX iptables-1.8.8-format-security.patch 639 BLAKE2B df5c843d0cd6634740b37230026 AUX iptables-1.8.8-musl-headers.patch 2061 BLAKE2B 6876d083d179a055c60422397e67a24137ae5bb72cba02f732d4dd7313171c10717202a41f1256196d5b64bc29d22e98d8d0eb9861130fa93481b527d0117e96 SHA512 136f3c7dae7c88739ed1c2d2c14e9a8381013c8a376bee80a7f994098810bb61d76dd143dc65430f0ec7b44d542b64242dd947134936468155840a4a26e6ce79 AUX iptables-1.8.8-out-of-tree-build.patch 1058 BLAKE2B 5a358632780b607533033dc3bf6b6e24ac1af49dbbc26afae05668187c2a4072dba1cdbf51647b6b5f7c5f68e5a3d64fa82b5b0477d3cd4e936d466b731707fb SHA512 453ed9a2b3b2dddb3ccc9a099386c28290416ea356884084fd4d9bd2b026e21732b91f020fbe55de12ba970b815993f2e3a18a52a6774ab7738383e2f144a973 AUX iptables-1.8.8-uint-musl.patch 4607 BLAKE2B 8ca4ba2fec97e99e1f57d9d1f376dbdab53a698279534879163ad5dade629cda3ac232df54d57ae75e589c2327492953e0c30356bdc4367b9a1474afc259136c SHA512 01d3af7330334b5002ec9d50e4b469651148b911d9ab5d45d5a2cd08e72c3be5e770c047cbc337485e40cb622ee470faa9ed91b53ca59e09a1c197bf5df48a9a +AUX iptables-1.8.9-fix-checking-existence-of-rule.patch 1239 BLAKE2B 664a47b1c0f2360493dce886c6dcf8cfbf165eb1a490cf7cf8d182073b0256bb140a547f9b8ce79d26424e9bb76047b41582a3a7b7f7f5e1301269a849d4389a SHA512 63e6dfba096c163995760a7a1a8881c90a61e7a247f1c87ef3f162597e2e1161e2c5438e1e467c6e600847e011430520556315d1aae72baac005dede1f69f7cc AUX iptables-1.8.9-format-security.patch 870 BLAKE2B fc33c16eae1c77a5714ecb3f7bbb859dfe64b9506ac82a6d8f91f206d24a5ebf66664e141b60e4580e59bd85314d27df5edf6bd11511ffa4dab7deaf833ccb93 SHA512 7551438de030506e4fe462a715f6a16637991f90cfaddc352a95c0341c72ae7d90728bc0a4e56da2cc108ff2c4e3f9e92451fb6dc65633d47973694550fd08b4 AUX iptables-r1.confd 890 BLAKE2B 0aaca870e3c03f19a71cf1b210377dfda320faf118359e298bef419eaf280fd11c9726d200ae89602e863c9b48de0bb51ac05424b50c064afe948a980e300153 SHA512 10002da01ded6be0e9bca6041798ad0859fa2212fde077a048443e4f3012c95d86e4580ae426e87af5891368062af9af6f9fd35ed617d24cdd3c51702b816b13 AUX iptables-r3.init 3961 BLAKE2B fd25c46060f31242e1cb5e07281a79431eba2915a34fd91df86f3e6573029d46bb3cdf97d1297863def105cbbc34fadf6b19785951ca16893f1fe539bb070354 SHA512 13a5128f531f9f146e5f77985b899ec5d8b99223b3a1e90e656c1819bfa0984645de412b3938f998eb216ef98d5fd558dbc183351e707be0997499f40f706f16 @@ -15,5 +16,6 @@ AUX systemd/iptables-store.service 240 BLAKE2B 7ddb4425e63cd41f421767fab25a7b055 DIST iptables-1.8.8.tar.bz2 746985 BLAKE2B 0da021cc7313b86af331768904956dab3eee3de245a7b03965129f3d7f13097fc03fbb1390167dcd971eff216eabad9e59b261a9c0f54bfc48a77453aa40d164 SHA512 f21df23279a77531a23f3fcb1b8f0f8ec0c726bda236dd0e33af74b06753baff6ce3f26fb9fcceb6fada560656ba901e68fc6452eb840ac1b206bc4654950f59 DIST iptables-1.8.9.tar.xz 637848 BLAKE2B 37ba80be0ee7049c4d3ee5689b273b4d2cc6e6fb9ebb297e86976b5750f987f2ae4536013fe1749ae79b6989c241eaece3202019fafd47d842c7a4fe3e5093b1 SHA512 e367bf286135e39b7401e852de25c1ed06d44befdffd92ed1566eb2ae9704b48ac9196cb971f43c6c83c6ad4d910443d32064bcdf618cfcef6bcab113e31ff70 EBUILD iptables-1.8.8-r5.ebuild 4733 BLAKE2B 46f0e77386ae051047868354c5ce774e4d88113aed56e70338c98150de672b959d2200d5da59051f1272cbad28a03153bc5503705c1b58bbb9c7fb041947fd6e SHA512 d0379b878c8c7d52b6967a9a8634ee5e48fceee70910733d1ec46f793fdf5adceb8946924619052b63c77a4715a5225a2a95f61402c29c4110aa0af4a5e88a33 +EBUILD iptables-1.8.9-r1.ebuild 4622 BLAKE2B 383ea5670b8dba7f24a856410791b71a2effa8a1e036f65257e69f3f94277ddc1702e9bf3339f5688a5fdc870bf73ff10752e3023fc3645b23dc706cd5d802d4 SHA512 0f2bbdd082eba3db6d441a624a325004fc1513531cc309ce79afae1c79817b4ce786b41e1028fae280937a6aae167ccdc66f509360eff67bf6bec38b1d1368c2 EBUILD iptables-1.8.9.ebuild 4550 BLAKE2B 8523b469f8026540cd89671cbea77b1225706138f691432fc587ad5879836321737635808fd6a1cd09c39f6099c997971a55c1fa13400c6f855e96605c9c9e9c SHA512 104e707f59fa1b071ec720d44c4971ec3a69f87f2e077c44f2248b39045d6f241e18e7cdb0f2c521fef1dda250a09aa028a8815dd194ea13ce3fe70062545b69 MISC metadata.xml 1466 BLAKE2B 7378fedb44c6e6d19e508a764ec997911f966beccd40b1f93096ad3343b7cd72f9ca129e67a666c54ca4382348a448597bd607197ffe6b94669d84306c81d127 SHA512 f89038980e81bfceaf872ff1938c47e8ad12060bbe9ff48e0e9ca9dd5acc0196b2261d2b22a156cbfd7be89d1d67448969d39ff9b28efb0896702760afa14842 diff --git a/net-firewall/iptables/files/iptables-1.8.9-fix-checking-existence-of-rule.patch b/net-firewall/iptables/files/iptables-1.8.9-fix-checking-existence-of-rule.patch new file mode 100644 index 000000000000..16c894f185e7 --- /dev/null +++ b/net-firewall/iptables/files/iptables-1.8.9-fix-checking-existence-of-rule.patch @@ -0,0 +1,34 @@ +https://git.netfilter.org/iptables/commit/?id=78850e7dba64a949c440dbdbe557f59409c6db48 + +From 78850e7dba64a949c440dbdbe557f59409c6db48 Mon Sep 17 00:00:00 2001 +From: Markus Boehme <markubo@amazon.com> +Date: Mon, 3 Apr 2023 23:13:47 +0200 +Subject: [PATCH] ip6tables: Fix checking existence of rule + +Pass the proper entry size when creating a match mask for checking the +existence of a rule. Failing to do so causes wrong results. + +Reported-by: Jonathan Caicedo <jonathan@jcaicedo.com> +Fixes: eb2546a846776 ("xshared: Share make_delete_mask() between ip{,6}tables") +Signed-off-by: Markus Boehme <markubo@amazon.com> +Signed-off-by: Phil Sutter <phil@nwl.cc> +--- + iptables/ip6tables.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c +index 345af451..9afc32c1 100644 +--- a/iptables/ip6tables.c ++++ b/iptables/ip6tables.c +@@ -331,7 +331,7 @@ check_entry(const xt_chainlabel chain, struct ip6t_entry *fw, + int ret = 1; + unsigned char *mask; + +- mask = make_delete_mask(matches, target, sizeof(fw)); ++ mask = make_delete_mask(matches, target, sizeof(*fw)); + for (i = 0; i < nsaddrs; i++) { + fw->ipv6.src = saddrs[i]; + fw->ipv6.smsk = smasks[i]; +-- +2.42.0.283.g2d96d420d3-goog + diff --git a/net-firewall/iptables/iptables-1.8.9-r1.ebuild b/net-firewall/iptables/iptables-1.8.9-r1.ebuild new file mode 100644 index 000000000000..f3c3728c7812 --- /dev/null +++ b/net-firewall/iptables/iptables-1.8.9-r1.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs autotools flag-o-matic usr-ldscript + +DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" +HOMEPAGE="https://www.netfilter.org/projects/iptables/" +SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.xz" + +LICENSE="GPL-2" +# Subslot reflects PV when libxtables and/or libip*tc was changed +# the last time. +SLOT="0/1.8.3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="conntrack netlink nftables pcap static-libs" + +COMMON_DEPEND=" + conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 ) + netlink? ( net-libs/libnfnetlink ) + nftables? ( + >=net-libs/libmnl-1.0:= + >=net-libs/libnftnl-1.1.6:= + ) + pcap? ( net-libs/libpcap ) +" +DEPEND=" + ${COMMON_DEPEND} + virtual/os-headers + >=sys-kernel/linux-headers-4.4:0 +" +BDEPEND=" + virtual/pkgconfig + nftables? ( + sys-devel/flex + app-alternatives/yacc + ) +" +RDEPEND=" + ${COMMON_DEPEND} + nftables? ( net-misc/ethertypes ) + !<net-firewall/ebtables-2.0.11-r1 + !<net-firewall/arptables-0.0.5-r1 +" +IDEPEND=">=app-eselect/eselect-iptables-20220320" + +PATCHES=( + "${FILESDIR}"/${PN}-1.8.4-no-symlinks.patch + "${FILESDIR}"/${P}-format-security.patch + "${FILESDIR}"/${PN}-1.8.9-fix-checking-existence-of-rule.patch +) + +src_prepare() { + # Use the saner headers from the kernel + rm include/linux/{kernel,types}.h || die + + default + eautoreconf +} + +src_configure() { + # Some libs use $(AR) rather than libtool to build, bug #444282 + tc-export AR + + # Hack around struct mismatches between userland & kernel for some ABIs + # bug #472388 + use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct + + sed -i \ + -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ + -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ + configure || die + + local myeconfargs=( + --sbindir="${EPREFIX}/sbin" + --libexecdir="${EPREFIX}/$(get_libdir)" + --enable-devel + --enable-ipv6 + --enable-shared + $(use_enable nftables) + $(use_enable pcap bpf-compiler) + $(use_enable pcap nfsynproxy) + $(use_enable static-libs static) + ) + + econf "${myeconfargs[@]}" +} + +src_compile() { + emake V=1 +} + +src_install() { + default + + # Managed by eselect-iptables + # https://bugs.gentoo.org/881295 + rm "${ED}/usr/bin/iptables-xml" || die + + dodoc iptables/iptables.xslt + + # All the iptables binaries are in /sbin, so might as well + # put these small files in with them + into / + dosbin iptables/iptables-apply + dosym iptables-apply /sbin/ip6tables-apply + doman iptables/iptables-apply.8 + + insinto /usr/include + doins include/ip{,6}tables.h + insinto /usr/include/iptables + doins include/iptables/internal.h + + keepdir /var/lib/ip{,6}tables + newinitd "${FILESDIR}"/${PN}-r3.init iptables + newconfd "${FILESDIR}"/${PN}-r1.confd iptables + dosym iptables /etc/init.d/ip6tables + newconfd "${FILESDIR}"/ip6tables-r1.confd ip6tables + + if use nftables; then + # Bug #647458 + rm "${ED}"/etc/ethertypes || die + + # Bugs #660886 and #669894 + rm "${ED}"/sbin/{arptables,ebtables}{,-{save,restore}} || die + fi + + systemd_dounit "${FILESDIR}"/systemd/ip{,6}tables-{re,}store.service + + # Move important libs to /lib, bug #332175 + gen_usr_ldscript -a ip{4,6}tc xtables + + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_postinst() { + local default_iptables="xtables-legacy-multi" + if ! eselect iptables show &>/dev/null; then + elog "Current iptables implementation is unset, setting to ${default_iptables}" + eselect iptables set "${default_iptables}" + fi + + if use nftables; then + local tables + for tables in {arp,eb}tables; do + if ! eselect ${tables} show &>/dev/null; then + elog "Current ${tables} implementation is unset, setting to ${default_iptables}" + eselect ${tables} set xtables-nft-multi + fi + done + fi + + eselect iptables show +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} ]]; then + elog "Unsetting iptables symlinks before removal" + eselect iptables unset + fi + + if ! has_version 'net-firewall/ebtables'; then + elog "Unsetting ebtables symlinks before removal" + eselect ebtables unset + elif [[ -z ${REPLACED_BY_VERSION} ]]; then + elog "Resetting ebtables symlinks to ebtables-legacy" + eselect ebtables set ebtables-legacy + fi + + if ! has_version 'net-firewall/arptables'; then + elog "Unsetting arptables symlinks before removal" + eselect arptables unset + elif [[ -z ${REPLACED_BY_VERSION} ]]; then + elog "Resetting arptables symlinks to arptables-legacy" + eselect arptables set arptables-legacy + fi + + # The eselect module failing should not be fatal + return 0 +} |