Small fixes for newer glibc/gcc compat
Hi!
Please find attached 2 patches I made for
libnetfilter_{conntrack,queue}.
They both fix compilation issues on newer toolchains.
Signature · 2 lines
Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key This message represents the official view of the voices in my head
l3extensions/libnetfilter_conntrack_ipv6.c +2 -2
@@ -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 ;
src/conntrack/snprintf_default.c +2 -2
@@ -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 ;
src/conntrack/snprintf_xml.c +1 -1
@@ -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 ;
utils/nfqnl_test.c +1 -0
@@ -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>
Quoted 6 lines · Paul P Komkoff Jr
Hi!
Please find attached 2 patches I made for
libnetfilter_{conntrack,queue}.They both fix compilation issues on newer toolchains.
Applied. Thanks Paul.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers