All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul P Komkoff Jr <i@stingr.net>
To: netfilter-devel@vger.kernel.org
Subject: Small fixes for newer glibc/gcc compat
Date: Sat, 23 Feb 2008 00:30:25 +0300	[thread overview]
Message-ID: <20080222213025.GV3726@stingr.net> (raw)

[-- 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>

             reply	other threads:[~2008-02-22 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 21:30 Paul P Komkoff Jr [this message]
2008-02-22 23:18 ` Small fixes for newer glibc/gcc compat Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080222213025.GV3726@stingr.net \
    --to=i@stingr.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.