netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Small fixes for newer glibc/gcc compat
@ 2008-02-22 21:30 Paul P Komkoff Jr
  2008-02-22 23:18 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Paul P Komkoff Jr @ 2008-02-22 21:30 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

Hi!

Please find attached 2 patches I made for
libnetfilter_{conntrack,queue}.

They both fix compilation issues on newer toolchains.

-- 
Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key
 This message represents the official view of the voices in my head

[-- Attachment #2: libnetfilter_conntrack-in6addr.patch --]
[-- Type: text/plain, Size: 1774 bytes --]

diff --git a/l3extensions/libnetfilter_conntrack_ipv6.c b/l3extensions/libnetfilter_conntrack_ipv6.c
index b0c7a3f..5f173f3 100644
--- a/l3extensions/libnetfilter_conntrack_ipv6.c
+++ b/l3extensions/libnetfilter_conntrack_ipv6.c
@@ -48,8 +48,8 @@ static int print_proto(char *buf, struct nfct_tuple *tuple)
 	char tmp[INET6_ADDRSTRLEN];
 	int size;
 
-	memcpy(&src.in6_u, tuple->src.v6, sizeof(struct in6_addr));
-	memcpy(&dst.in6_u, tuple->dst.v6, sizeof(struct in6_addr));
+	memcpy(&src, tuple->src.v6, sizeof(struct in6_addr));
+	memcpy(&dst, tuple->dst.v6, sizeof(struct in6_addr));
 
 	if (!inet_ntop(AF_INET6, &src, tmp, sizeof(tmp)))
 		return 0;
diff --git a/src/conntrack/snprintf_default.c b/src/conntrack/snprintf_default.c
index 996fe1a..382b2d9 100644
--- a/src/conntrack/snprintf_default.c
+++ b/src/conntrack/snprintf_default.c
@@ -92,8 +92,8 @@ int __snprintf_address_ipv6(char *buf,
 	struct in6_addr dst;
 	char tmp[INET6_ADDRSTRLEN];
 
-	memcpy(&src.in6_u, &tuple->src.v6, sizeof(struct in6_addr));
-	memcpy(&dst.in6_u, &tuple->dst.v6, sizeof(struct in6_addr));
+	memcpy(&src, &tuple->src.v6, sizeof(struct in6_addr));
+	memcpy(&dst, &tuple->dst.v6, sizeof(struct in6_addr));
 
 	if (!inet_ntop(AF_INET6, &src, tmp, sizeof(tmp)))
 		return -1;
diff --git a/src/conntrack/snprintf_xml.c b/src/conntrack/snprintf_xml.c
index 56b2016..7bd1b43 100644
--- a/src/conntrack/snprintf_xml.c
+++ b/src/conntrack/snprintf_xml.c
@@ -98,7 +98,7 @@ static int __snprintf_ipv6_xml(char *buf,
 	static char tmp[INET6_ADDRSTRLEN];
 	const void *p = (type == __ADDR_SRC) ? &tuple->src.v6 : &tuple->dst.v6;
 
-	memcpy(&addr.in6_u, p, sizeof(struct in6_addr));
+	memcpy(&addr, p, sizeof(struct in6_addr));
 
 	if (!inet_ntop(AF_INET6, &addr, tmp, sizeof(tmp)))
 		return -1;

[-- Attachment #3: libnetfilter_queue-linuxtypes.patch --]
[-- Type: text/plain, Size: 347 bytes --]

diff --git a/utils/nfqnl_test.c b/utils/nfqnl_test.c
index af224de..be72974 100644
--- a/utils/nfqnl_test.c
+++ b/utils/nfqnl_test.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <netinet/in.h>
+#include <linux/types.h>
 #include <linux/netfilter.h>		/* for NF_ACCEPT */
 
 #include <libnetfilter_queue/libnetfilter_queue.h>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Small fixes for newer glibc/gcc compat
  2008-02-22 21:30 Small fixes for newer glibc/gcc compat Paul P Komkoff Jr
@ 2008-02-22 23:18 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2008-02-22 23:18 UTC (permalink / raw)
  To: netfilter-devel

Paul P Komkoff Jr wrote:
> Hi!
> 
> Please find attached 2 patches I made for
> libnetfilter_{conntrack,queue}.
> 
> They both fix compilation issues on newer toolchains.

Applied. Thanks Paul.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-22 23:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 21:30 Small fixes for newer glibc/gcc compat Paul P Komkoff Jr
2008-02-22 23:18 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).