diff --git a/fix-nargs-show-dismatch.patch b/fix-nargs-show-dismatch.patch new file mode 100644 index 0000000000000000000000000000000000000000..b38f2e268451abb6a47b50da30ea709b04765d85 --- /dev/null +++ b/fix-nargs-show-dismatch.patch @@ -0,0 +1,31 @@ +From b6f9c55a301654891288ef11358290ce67519930 Mon Sep 17 00:00:00 2001 +From: renwang +Date: Tue, 3 Dec 2024 15:55:57 +0800 +Subject: [PATCH] second + +--- + iptables/iptables.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/iptables/iptables.c b/iptables/iptables.c +index 88ef6cf..fba69a9 100644 +--- a/iptables/iptables.c ++++ b/iptables/iptables.c +@@ -478,10 +478,10 @@ print_firewall(const struct ipt_entry *fw, + fputc(fw->ip.invflags & XT_INV_PROTO ? '!' : ' ', stdout); + { + const char *pname = proto_to_name(fw->ip.proto, format&FMT_NUMERIC); +- if (pname) +- printf(FMT("%-5s", "%s "), pname); +- else +- printf(FMT("%-5hu", "%hu "), fw->ip.proto); ++ if (((format & (FMT_NUMERIC | FMT_NOTABLE)) == FMT_NUMERIC) || !pname) ++ printf(FMT("%-4hu ", "%hu "),fw->ip.proto); ++ else ++ printf(FMT("%-4s ", "%s "), pname); + } + + if (format & FMT_OPTIONS) { +-- +2.20.1 + diff --git a/iptables.spec b/iptables.spec index 5b49a750d7f71d7face6e163ea89fee36b2adcc5..5153704969905b7f9d1b6abf56a67d43ed81309d 100644 --- a/iptables.spec +++ b/iptables.spec @@ -2,7 +2,7 @@ %global legacy_actions %{_libexecdir}/initscripts/legacy-actions Name: iptables Version: 1.8.5 -Release: 8 +Release: 9 Summary: IP packet filter administration utilities License: GPL-2.0-only and Artistic-2.0 URL: https://www.netfilter.org/ @@ -21,6 +21,7 @@ Patch6005: backport-libxtables-Register-multiple-extensions-in-ascending- Patch6006: backport-libxtables-Simplify-pending-extension-registration.patch Patch6007: backport-libxtables-Register-only-the-highest-revision-extension.patch Patch6008: enabled-makecheck-in-extensions.patch +Patch6009: fix-nargs-show-dismatch.patch BuildRequires: bison flex gcc kernel-headers libpcap-devel libselinux-devel systemd git BuildRequires: libmnl-devel libnetfilter_conntrack-devel libnfnetlink-devel libnftnl-devel @@ -323,6 +324,12 @@ fi %{_mandir}/man8/xtables-legacy* %changelog +* Wed Dec 04 2024 renwang - 1.8.5-9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix the -n args show dismatch + * Mon Sep 30 2024 zhouyihang - 1.8.5-8 - Type:bugfix - ID:NA @@ -335,7 +342,7 @@ fi - SUG:NA - DESC:fix license -* Mar Mar 22 2023 zhanghao - 1.8.5-6 +* Wed Mar 22 2023 zhanghao - 1.8.5-6 - Type:feature - ID:NA - SUG:NA