From 5d264de02ccc17151d8bf06f4d37c83f805e7efb Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Mon, 3 Mar 2008 13:47:25 +0000 Subject: [PATCH] - use s6_addr32 instead of in6_u.u6_addr32 --- iptables-1.4.0-in6_u.patch | 24 ++++++++++++++++++++++++ iptables.spec | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 iptables-1.4.0-in6_u.patch diff --git a/iptables-1.4.0-in6_u.patch b/iptables-1.4.0-in6_u.patch new file mode 100644 index 0000000..3bb7b25 --- /dev/null +++ b/iptables-1.4.0-in6_u.patch @@ -0,0 +1,24 @@ +diff -up iptables-1.4.0/ip6tables.c.in6_u iptables-1.4.0/ip6tables.c +--- iptables-1.4.0/ip6tables.c.in6_u 2008-03-03 14:33:30.000000000 +0100 ++++ iptables-1.4.0/ip6tables.c 2008-03-03 14:38:54.000000000 +0100 +@@ -678,7 +678,7 @@ parse_hostnetworkmask(const char *name, + for (i = 0, j = 0; i < n; i++) { + int k; + for (k = 0; k < 4; k++) +- addrp[j].in6_u.u6_addr32[k] &= maskp->in6_u.u6_addr32[k]; ++ addrp[j].s6_addr32[k] &= maskp->s6_addr32[k]; + j++; + for (k = 0; k < j - 1; k++) { + if (IN6_ARE_ADDR_EQUAL(&addrp[k], &addrp[j - 1])) { +diff -up iptables-1.4.0/libiptc/libip6tc.c.in6_u iptables-1.4.0/libiptc/libip6tc.c +--- iptables-1.4.0/libiptc/libip6tc.c.in6_u 2008-03-03 14:33:31.000000000 +0100 ++++ iptables-1.4.0/libiptc/libip6tc.c 2008-03-03 14:33:31.000000000 +0100 +@@ -113,7 +113,7 @@ typedef unsigned int socklen_t; + #include "libiptc.c" + + #define BIT6(a, l) \ +- ((ntohl(a->in6_u.u6_addr32[(l) / 32]) >> (31 - ((l) & 31))) & 1) ++ ((ntohl(a->s6_addr32[(l) / 32]) >> (31 - ((l) & 31))) & 1) + + int + ipv6_prefix_length(const struct in6_addr *a) diff --git a/iptables.spec b/iptables.spec index ea28613..8b2abd5 100644 --- a/iptables.spec +++ b/iptables.spec @@ -11,6 +11,7 @@ Source2: iptables-config Patch0: iptables-1.3.8-iptc.patch Patch4: iptables-1.3.8-typo_latter.patch Patch5: iptables-1.4.0-cloexec.patch +Patch6: iptables-1.4.0-in6_u.patch Group: System Environment/Base URL: http://www.netfilter.org/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -60,6 +61,7 @@ stable and may change with every new version. It is therefore unsupported. %patch0 -p1 -b .iptc %patch4 -p1 -b .typo_latter %patch5 -p1 -b .cloexec +%patch6 -p1 -b .in6_u # Put it to a reasonable place find . -type f -exec perl -pi -e "s,/usr/local,%{_prefix},g" {} \; @@ -164,6 +166,7 @@ fi * Mon Mar 3 2008 Thomas Woerner 1.4.0-3 - use the kernel headers from the build tree for iptables for now to be able to compile this package, but this makes the package more kernel dependant +- use s6_addr32 instead of in6_u.u6_addr32 * Wed Feb 20 2008 Fedora Release Engineering - 1.4.0-2 - Autorebuild for GCC 4.3