diff --git a/.gitignore b/.gitignore index 94b3aa2..fece6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /libnftnl-1.1.7.tar.bz2 /libnftnl-1.1.8.tar.bz2 /libnftnl-1.1.9.tar.bz2 +/libnftnl-1.2.1.tar.bz2 diff --git a/0001-exthdr-tcp-option-reset-support.patch b/0001-exthdr-tcp-option-reset-support.patch new file mode 100644 index 0000000..ad32cd9 --- /dev/null +++ b/0001-exthdr-tcp-option-reset-support.patch @@ -0,0 +1,37 @@ +From 1b07e9c74389dc57d727d8d6628d38a65db5026b Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Sat, 19 Feb 2022 14:39:04 +0100 +Subject: [PATCH] exthdr: tcp option reset support + +Adds print debug support for tcp reset feature. + +Signed-off-by: Florian Westphal +(cherry picked from commit e2514c0eff4da7e8e0aabd410f7b7d0b7564c880) +--- + src/expr/exthdr.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c +index 1b813b1e47c4d..625dd5d3d0a49 100644 +--- a/src/expr/exthdr.c ++++ b/src/expr/exthdr.c +@@ -247,10 +247,15 @@ nftnl_expr_exthdr_snprintf(char *buf, size_t len, + exthdr->offset, + exthdr->flags & NFT_EXTHDR_F_PRESENT ? " present" : "", + exthdr->dreg); +- else ++ else if (e->flags & (1 << NFTNL_EXPR_EXTHDR_SREG)) + return snprintf(buf, len, "write%s reg %u => %ub @ %u + %u ", + op2str(exthdr->op), exthdr->sreg, exthdr->len, exthdr->type, + exthdr->offset); ++ else if (exthdr->op == NFT_EXTHDR_OP_TCPOPT && exthdr->len == 0) ++ return snprintf(buf, len, "reset tcpopt %u ", exthdr->type); ++ else ++ return snprintf(buf, len, "op %u len %u type %u offset %u ", ++ exthdr->op, exthdr->len, exthdr->type, exthdr->offset); + + } + +-- +2.34.1 + diff --git a/libnftnl.spec b/libnftnl.spec index c1299a8..6716855 100644 --- a/libnftnl.spec +++ b/libnftnl.spec @@ -1,12 +1,14 @@ Name: libnftnl -Version: 1.1.9 -Release: 4%{?dist} +Version: 1.2.1 +Release: 1%{?dist} Summary: Library for low-level interaction with nftables Netlink's API over libmnl License: GPLv2+ URL: https://netfilter.org/projects/libnftnl/ Source0: https://www.netfilter.org/pub/libnftnl/libnftnl-%{version}.tar.bz2 +Patch01: 0001-exthdr-tcp-option-reset-support.patch + BuildRequires: libmnl-devel BuildRequires: jansson-devel BuildRequires: gcc @@ -58,6 +60,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_includedir}/libnftnl %changelog +* Wed May 18 2022 Phil Sutter - 1.2.1-1 +- Fix debug printing for tcp option reset expression +- new version 1.2.1 + * Mon Aug 09 2021 Mohan Boddu - 1.1.9-4 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/sources b/sources index f9db5e4..8e31675 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libnftnl-1.1.9.tar.bz2) = 8e2551a902a320769198e0ebce52596501c548e230c3172ba4989e25dcb3dd6c9b97a104af69b93ede4ef298811cff10608758e6f1d274e758d87306c4b50f25 +SHA512 (libnftnl-1.2.1.tar.bz2) = cabe6896210c451d7917d1abde5e73a65594d53f011486f75dd7be5b4804c49d10f0e508675e091e1faf0363b82670b3f3a167a85db91d52742dc69445888b6a