From 53fbde578bca87479db2dc08997ca233b0d41733 Mon Sep 17 00:00:00 2001 From: renwang Date: Wed, 4 Dec 2024 15:05:57 +0800 Subject: [PATCH] first --- ...rt-iptables-Fix-n-args-show-dismatch.patch | 31 +++++++++++++++++++ iptables.spec | 7 +++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 backport-iptables-Fix-n-args-show-dismatch.patch diff --git a/backport-iptables-Fix-n-args-show-dismatch.patch b/backport-iptables-Fix-n-args-show-dismatch.patch new file mode 100644 index 0000000..b38f2e2 --- /dev/null +++ b/backport-iptables-Fix-n-args-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 5b49a75..70b8613 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: backport-iptables-Fix-n-args-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,8 @@ fi %{_mandir}/man8/xtables-legacy* %changelog +* Wed Dec 04 2024 renwang - 1.8.5-9 + * Mon Sep 30 2024 zhouyihang - 1.8.5-8 - Type:bugfix - ID:NA @@ -335,7 +338,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 -- Gitee