Compare commits
10 Commits
226525785b
...
8ed8d36226
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ed8d36226 | ||
|
|
46fda456df | ||
|
|
bf8ff030c2 | ||
|
|
cddc328ac3 | ||
|
|
8e535a1dfc | ||
|
|
53659c6997 | ||
|
|
00e8203459 | ||
|
|
bfab99e6cb | ||
|
|
8520f39c3f | ||
|
|
8bccde7be3 |
32
backport-Fix-for-memleak-when-parsing-j-arg.patch
Normal file
32
backport-Fix-for-memleak-when-parsing-j-arg.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 42cb292d6c9e8567db2e30e183b1bd31093700ad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Phil Sutter <phil@nwl.cc>
|
||||||
|
Date: Fri, 25 Mar 2022 10:30:29 +0100
|
||||||
|
Subject: connntrack: Fix for memleak when parsing -j arg
|
||||||
|
|
||||||
|
Have to free the strings allocated by split_address_and_port().
|
||||||
|
|
||||||
|
Fixes: 29b390a212214 ("conntrack: Support IPv6 NAT")
|
||||||
|
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||||
|
|
||||||
|
Conflict:do_parse => main
|
||||||
|
Reference:https://git.netfilter.org/conntrack-tools/commit/?id=42cb292d6c9e8567db2e30e183b1bd31093700ad
|
||||||
|
---
|
||||||
|
src/conntrack.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/conntrack.c b/src/conntrack.c
|
||||||
|
index f65926b..415f551 100644
|
||||||
|
--- a/src/conntrack.c
|
||||||
|
+++ b/src/conntrack.c
|
||||||
|
@@ -2466,6 +2466,8 @@ int main(int argc, char *argv[])
|
||||||
|
nfct_set_nat_details(c, tmpl.ct, &ad,
|
||||||
|
port_str, family);
|
||||||
|
}
|
||||||
|
+ free(port_str);
|
||||||
|
+ free(nat_address);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'w':
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,15 +1,20 @@
|
|||||||
|
#needsrootforbuild
|
||||||
Name: conntrack-tools
|
Name: conntrack-tools
|
||||||
Version: 1.4.6
|
Version: 1.4.6
|
||||||
Release: 1
|
Release: 6
|
||||||
Summary: Userspace tools for interacting with the Connection Tracking System
|
Summary: Userspace tools for interacting with the Connection Tracking System
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://conntrack-tools.netfilter.org/
|
URL: http://conntrack-tools.netfilter.org/
|
||||||
Source0: http://netfilter.org/projects/conntrack-tools/files/%{name}-%{version}.tar.bz2
|
Source0: http://netfilter.org/projects/conntrack-tools/files/%{name}-%{version}.tar.bz2
|
||||||
Source1: conntrackd.service
|
Source1: conntrackd.service
|
||||||
Source2: conntrackd.conf
|
Source2: conntrackd.conf
|
||||||
|
|
||||||
|
Patch0: backport-Fix-for-memleak-when-parsing-j-arg.patch
|
||||||
|
|
||||||
BuildRequires: libnfnetlink-devel >= 1.0.1 libnetfilter_conntrack-devel >= 1.0.8 libtirpc-devel
|
BuildRequires: libnfnetlink-devel >= 1.0.1 libnetfilter_conntrack-devel >= 1.0.8 libtirpc-devel
|
||||||
BuildRequires: libnetfilter_cttimeout-devel >= 1.0.0 libnetfilter_cthelper-devel >= 1.0.0 systemd
|
BuildRequires: libnetfilter_cttimeout-devel >= 1.0.0 libnetfilter_cthelper-devel >= 1.0.0 systemd
|
||||||
BuildRequires: libmnl-devel >= 1.0.3 libnetfilter_queue-devel >= 1.0.2 pkgconfig bison flex systemd-devel
|
BuildRequires: libmnl-devel >= 1.0.3 libnetfilter_queue-devel >= 1.0.2 pkgconfig bison flex systemd-devel
|
||||||
|
BuildRequires: gcc
|
||||||
Provides: conntrack = 1.0-1
|
Provides: conntrack = 1.0-1
|
||||||
Obsoletes: conntrack < 1.0-1
|
Obsoletes: conntrack < 1.0-1
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
@ -51,6 +56,14 @@ install -d 0755 %{buildroot}%{_unitdir}
|
|||||||
install -m644 %{SOURCE1} %{buildroot}%{_unitdir}/
|
install -m644 %{SOURCE1} %{buildroot}%{_unitdir}/
|
||||||
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/conntrackd/
|
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/conntrackd/
|
||||||
|
|
||||||
|
%check
|
||||||
|
cd tests/conntrack
|
||||||
|
sh run-test.sh
|
||||||
|
cd ../nfct
|
||||||
|
sed -i "s/\/usr\/sbin/..\/..\/src/g" test.c
|
||||||
|
sh run-test.sh
|
||||||
|
cd ../../
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post conntrackd.service
|
%systemd_post conntrackd.service
|
||||||
|
|
||||||
@ -74,6 +87,36 @@ install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/conntrackd/
|
|||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 19 2023 yanglu <yanglu72@h-partners.com> - 1.4.6-6
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Optimize enabled DT testcases
|
||||||
|
|
||||||
|
* Mon Jan 09 2023 zhanghao <zhanghao383@huawei.com> - 1.4.6-5
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:enabled DT testcases
|
||||||
|
|
||||||
|
* Mon Oct 31 2022 yanglu <yanglu72@h-partners.com> - 1.4.6-4
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:conntrack:Fix for memleak when parsing -j arg
|
||||||
|
|
||||||
|
* Thu Apr 28 2022 yanglu <yanglu72@h-partners.com> - 1.4.6-3
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:rebuild package
|
||||||
|
|
||||||
|
* Thu May 27 2021 lijingyuan <lijingyuan3@huawei.com> - 1.4.6-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Add the compilation dependency of gcc.
|
||||||
|
|
||||||
* Sat Jul 25 2020 gaihuiying <gaihuiying1@huawei.com> - 1.4.6-1
|
* Sat Jul 25 2020 gaihuiying <gaihuiying1@huawei.com> - 1.4.6-1
|
||||||
- Type:requirement
|
- Type:requirement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user