Compare commits
No commits in common. 'c9' and 'cs10' have entirely different histories.
@ -1 +1,2 @@
|
||||
SOURCES/libnetfilter_conntrack-1.0.9.tar.bz2
|
||||
SOURCES/libnetfilter_conntrack-1.0.9.tar.bz2.sig
|
||||
|
@ -1 +1,2 @@
|
||||
5e27ae89897080aa83eb32b836c4fbe16920db29 SOURCES/libnetfilter_conntrack-1.0.9.tar.bz2
|
||||
9e592f042d0be7881fca6fd752711cc6bb33e339 SOURCES/libnetfilter_conntrack-1.0.9.tar.bz2.sig
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 1b11bd195088a47ecc04f801edc1ff8d58a1462f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Fordham <peter.fordham@gmail.com>
|
||||
Date: Tue, 10 Jan 2023 23:02:18 +0100
|
||||
Subject: [PATCH] configure: C99 compatibility issues
|
||||
|
||||
As part of this effort:
|
||||
|
||||
https://fedoraproject.org/wiki/Toolchain/PortingToModernC
|
||||
|
||||
I've found an issue with one of the autoconf checks in the conntrack
|
||||
package. It uses the exit functions without including stdlib. This is
|
||||
deprecated in C99 because it no longer allows implicit function
|
||||
declarations. Find attached a patch that changes the check to use return
|
||||
instead of exit.
|
||||
|
||||
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1654
|
||||
Signed-off-by: Peter Fordham <peter.fordham@gmail.com>
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
(cherry picked from commit dafcf4a4199f99779ba3d700ec3b046762410205)
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9ae6cc6c742d1..24990ab977531 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -54,9 +54,9 @@ int main()
|
||||
struct in6_addr addr6;
|
||||
char buf[128];
|
||||
if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
else
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
}
|
||||
]])],[ AC_MSG_RESULT(yes)
|
||||
AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop supports IPv6.])
|
@ -1,57 +0,0 @@
|
||||
From 8ee1e27facf598a1362b29b794e51271b5be4db7 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 24 Feb 2022 15:01:11 +0100
|
||||
Subject: [PATCH] conntrack: fix build with kernel 5.15 and musl
|
||||
|
||||
Currently, with kernel 5.15 headers and musl building is failing with
|
||||
redefinition errors due to a conflict between the kernel and musl headers.
|
||||
|
||||
Musl is able to suppres the conflicting kernel header definitions if they
|
||||
are included after the standard libc ones, however since ICMP definitions
|
||||
were moved into a separate internal header to avoid duplication this has
|
||||
stopped working and is breaking the builds.
|
||||
|
||||
It seems that the issue is that <netinet/in.h> which contains the UAPI
|
||||
suppression defines is included in the internal.h header and not in the
|
||||
proto.h which actually includes the kernel ICMP headers and thus UAPI
|
||||
supression defines are not present.
|
||||
|
||||
Solve this by moving the <netinet/in.h> include before the ICMP kernel
|
||||
includes in the proto.h
|
||||
|
||||
Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||
(cherry picked from commit 21ee35dde73aec5eba35290587d479218c6dd824)
|
||||
---
|
||||
include/internal/internal.h | 1 -
|
||||
include/internal/proto.h | 1 +
|
||||
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/internal/internal.h b/include/internal/internal.h
|
||||
index 2ef8a9057628b..7cd7c44bf8336 100644
|
||||
--- a/include/internal/internal.h
|
||||
+++ b/include/internal/internal.h
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
-#include <netinet/in.h>
|
||||
|
||||
#include <libnfnetlink/libnfnetlink.h>
|
||||
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
|
||||
diff --git a/include/internal/proto.h b/include/internal/proto.h
|
||||
index 40e7bfe63cc77..60a5f4e4ff8e0 100644
|
||||
--- a/include/internal/proto.h
|
||||
+++ b/include/internal/proto.h
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _NFCT_PROTO_H_
|
||||
|
||||
#include <stdint.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <linux/icmp.h>
|
||||
#include <linux/icmpv6.h>
|
||||
|
||||
--
|
||||
2.38.0
|
||||
|
@ -0,0 +1,72 @@
|
||||
From 367d5e5871affb26c3e1ede1f618cdb43a0dc6dc Mon Sep 17 00:00:00 2001
|
||||
From: Phil Sutter <phil@nwl.cc>
|
||||
Date: Fri, 26 Apr 2024 16:39:49 +0200
|
||||
Subject: [PATCH] conntrack: bsf: Do not return -1 on failure
|
||||
|
||||
Return values of the filter add functions are used to update an array
|
||||
cursor, so sanely return 0 in error case.
|
||||
|
||||
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
(cherry picked from commit e0d9ff64a6a3062a706ab08d18792ba16a0f4f30)
|
||||
---
|
||||
src/conntrack/bsf.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/conntrack/bsf.c b/src/conntrack/bsf.c
|
||||
index 1549815eedcc5..b9a1ad20eb3ed 100644
|
||||
--- a/src/conntrack/bsf.c
|
||||
+++ b/src/conntrack/bsf.c
|
||||
@@ -331,7 +331,7 @@ add_state_filter_cta(struct sock_filter *this,
|
||||
s = stack_create(sizeof(struct jump), 3 + 32);
|
||||
if (s == NULL) {
|
||||
errno = ENOMEM;
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
jt = 1;
|
||||
@@ -398,7 +398,7 @@ add_state_filter(struct sock_filter *this,
|
||||
|
||||
if (cta[proto].cta_protoinfo == 0 && cta[proto].cta_state == 0) {
|
||||
errno = ENOTSUP;
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
return add_state_filter_cta(this,
|
||||
@@ -443,7 +443,7 @@ bsf_add_proto_filter(const struct nfct_filter *f, struct sock_filter *this)
|
||||
s = stack_create(sizeof(struct jump), 3 + 255);
|
||||
if (s == NULL) {
|
||||
errno = ENOMEM;
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
jt = 1;
|
||||
@@ -515,7 +515,7 @@ bsf_add_addr_ipv4_filter(const struct nfct_filter *f,
|
||||
s = stack_create(sizeof(struct jump), 3 + 127);
|
||||
if (s == NULL) {
|
||||
errno = ENOMEM;
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
jt = 1;
|
||||
@@ -600,7 +600,7 @@ bsf_add_addr_ipv6_filter(const struct nfct_filter *f,
|
||||
s = stack_create(sizeof(struct jump), 3 + 80);
|
||||
if (s == NULL) {
|
||||
errno = ENOMEM;
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
jf = 1;
|
||||
@@ -699,7 +699,7 @@ bsf_add_mark_filter(const struct nfct_filter *f, struct sock_filter *this)
|
||||
s = stack_create(sizeof(struct jump), 3 + 127);
|
||||
if (s == NULL) {
|
||||
errno = ENOMEM;
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
jt = 1;
|
@ -1,92 +0,0 @@
|
||||
From 883bc7739f467000f1ccb00b5d0e383c7289dcc0 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Sutter <phil@nwl.cc>
|
||||
Date: Fri, 25 Mar 2022 14:55:53 +0100
|
||||
Subject: [PATCH] expect/conntrack: Avoid spurious covscan overrun warning
|
||||
|
||||
It doesn't like how memset() is called for a struct nfnlhdr pointer with
|
||||
large size value. Pass void pointers instead. This also removes the call
|
||||
from __build_{expect,conntrack}() which is duplicate in
|
||||
__build_query_{exp,ct}() code-path.
|
||||
|
||||
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||||
(cherry picked from commit 86f5bdc2a85b208053e7361ccd575e4eb3c853a3)
|
||||
---
|
||||
src/conntrack/api.c | 4 +++-
|
||||
src/conntrack/build.c | 2 --
|
||||
src/expect/api.c | 4 +++-
|
||||
src/expect/build.c | 2 --
|
||||
4 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/conntrack/api.c b/src/conntrack/api.c
|
||||
index b7f64fb43ce83..7f72d07f2e7f6 100644
|
||||
--- a/src/conntrack/api.c
|
||||
+++ b/src/conntrack/api.c
|
||||
@@ -779,6 +779,8 @@ int nfct_build_conntrack(struct nfnl_subsys_handle *ssh,
|
||||
assert(req != NULL);
|
||||
assert(ct != NULL);
|
||||
|
||||
+ memset(req, 0, size);
|
||||
+
|
||||
return __build_conntrack(ssh, req, size, type, flags, ct);
|
||||
}
|
||||
|
||||
@@ -812,7 +814,7 @@ __build_query_ct(struct nfnl_subsys_handle *ssh,
|
||||
assert(data != NULL);
|
||||
assert(req != NULL);
|
||||
|
||||
- memset(req, 0, size);
|
||||
+ memset(buffer, 0, size);
|
||||
|
||||
switch(qt) {
|
||||
case NFCT_Q_CREATE:
|
||||
diff --git a/src/conntrack/build.c b/src/conntrack/build.c
|
||||
index b5a7061d53698..f80cfc12d5e38 100644
|
||||
--- a/src/conntrack/build.c
|
||||
+++ b/src/conntrack/build.c
|
||||
@@ -27,8 +27,6 @@ int __build_conntrack(struct nfnl_subsys_handle *ssh,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- memset(req, 0, size);
|
||||
-
|
||||
buf = (char *)&req->nlh;
|
||||
nlh = mnl_nlmsg_put_header(buf);
|
||||
nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | type;
|
||||
diff --git a/src/expect/api.c b/src/expect/api.c
|
||||
index 39cd09249684c..b100c72ded50e 100644
|
||||
--- a/src/expect/api.c
|
||||
+++ b/src/expect/api.c
|
||||
@@ -513,6 +513,8 @@ int nfexp_build_expect(struct nfnl_subsys_handle *ssh,
|
||||
assert(req != NULL);
|
||||
assert(exp != NULL);
|
||||
|
||||
+ memset(req, 0, size);
|
||||
+
|
||||
return __build_expect(ssh, req, size, type, flags, exp);
|
||||
}
|
||||
|
||||
@@ -546,7 +548,7 @@ __build_query_exp(struct nfnl_subsys_handle *ssh,
|
||||
assert(data != NULL);
|
||||
assert(req != NULL);
|
||||
|
||||
- memset(req, 0, size);
|
||||
+ memset(buffer, 0, size);
|
||||
|
||||
switch(qt) {
|
||||
case NFCT_Q_CREATE:
|
||||
diff --git a/src/expect/build.c b/src/expect/build.c
|
||||
index 2e0f968f36dad..1807adce26f62 100644
|
||||
--- a/src/expect/build.c
|
||||
+++ b/src/expect/build.c
|
||||
@@ -29,8 +29,6 @@ int __build_expect(struct nfnl_subsys_handle *ssh,
|
||||
else
|
||||
return -1;
|
||||
|
||||
- memset(req, 0, size);
|
||||
-
|
||||
buf = (char *)&req->nlh;
|
||||
nlh = mnl_nlmsg_put_header(buf);
|
||||
nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK_EXP << 8) | type;
|
||||
--
|
||||
2.38.0
|
||||
|
@ -0,0 +1,52 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF+HdQgBEACzteJUJGtj3N6u5mcGh4Nu/9GQfwrrphZuI7jto2N6+ZoURded
|
||||
660mFLnax7wgIE8ugAa085jwFWbFY3FzGutUs/kDmnqy9WneYNBLIAF3ZTFfY+oi
|
||||
V1C09bBlHKDj9gSEM2TZ/qU14exKdSloqcMKSdIqLQX27w/D6WmO1crDjOKKN9F2
|
||||
zjc3uLjo1gIPrY+Kdld29aI0W4gYvNLOo+ewhVC5Q6ymWOdR3eKaP2HIAt8CYf0t
|
||||
Sx8ChHdBvXQITDmXoGPLTTiCHBoUzaJ/N8m4AZTuSUTr9g3jUNFmL48OrJjFPhHh
|
||||
KDY0V59id5nPu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VAPub1V2X
|
||||
iooUIOQFAl+HdQgCGwwFCQeEzgAACgkQ1V2XiooUIOTTCBAAgXcF8AzEQfK0Hqja
|
||||
4W4e6Y2xxxZmoPGz75Jgqv4GBsfTEBChVBbRBjUgYepuaV6/YSfRw9ldeqvREW7g
|
||||
XAOsKLM+Hn0BQW22oHu2UhAgjfsTC4q0BkVW06M7tnkvBV3nR9F/X9CViwxlsEYP
|
||||
qQKkjrbhYx4WDI1acGx/7O9QYR/OMeUYFns4dgVi2z91LmOybVjQLwGnqOdybNnc
|
||||
84Iw6KT4rOKmUay0fXExo6mumU3Pz5S32grJuqxgZTcf2xSY8++fsp+7zEGuO3zg
|
||||
beKn64h1+xv04N7PMbEEixJtyARGIdu4aHPWQ+ORF4JvWYhgNtbfb9YwNu8k1WlK
|
||||
z2wuNIg7/wjHEOzdmNbCUb5q3ftqSsbTTbrbo48IAYLqOWyitud0eR8tGvjcyti0
|
||||
nPxpkfBCSRMFte6+q6Gne0rOmCJgmRMXmPggFtBRM8EKZqnznZbrLyMpOMeK9diR
|
||||
/EPDVhzM1N2Jv8qnaKZ/0gsAn1ybC+P3hywmlrsolo5YzWuzMDwyE8dmT0ROUBKg
|
||||
qouIGg1l8lR7fJXhhNRt86FzSaIFoQ7MIddOVJ5WRBHzr2x22sYFj4y1f8ZLh4VZ
|
||||
Wqncl20xMa4CulNsHrzUtN3QbkOm4zSGzCLfbpW4gVfDCVkdD2bZzSfefH9UFwuB
|
||||
k/i9xRtYOSbc/q5W7u9J4dpEia4=
|
||||
=m35R
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
Loading…
Reference in new issue