diff options
author | Khem Raj <raj.khem@gmail.com> | 2008-03-18 02:28:18 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2008-03-18 02:28:18 +0000 |
commit | 26c05893500c81dc0976f9146dacd5a9055abed4 (patch) | |
tree | 798f5c5217ad9c2c0aaa93ff7420b05a0b43f37e /packages | |
parent | 16808bc4817492beba512f4e73bce8c232d1eafa (diff) |
Make iptables buildable on latest eglibc. This patch will also be needed with glibc 2.8 onwards.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/iptables/files/iptables-use-s6_addr32.patch | 32 | ||||
-rw-r--r-- | packages/iptables/iptables_1.3.8.bb | 3 |
2 files changed, 34 insertions, 1 deletions
diff --git a/packages/iptables/files/iptables-use-s6_addr32.patch b/packages/iptables/files/iptables-use-s6_addr32.patch new file mode 100644 index 0000000000..d3d215ba58 --- /dev/null +++ b/packages/iptables/files/iptables-use-s6_addr32.patch @@ -0,0 +1,32 @@ +This patch fixes a compile error which is demonstrated with glibc/eglibc cvs +the union ip6_u has been renamed inside glibc header in.h here +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/inet/netinet/in.h.diff?r1=1.55&r2=1.56&cvsroot=glibc +We should be really using +the defines that are provided in inet/netinet/in.h to access the members instead. + +Index: iptables-1.3.8/ip6tables.c +=================================================================== +--- iptables-1.3.8.orig/ip6tables.c ++++ iptables-1.3.8/ip6tables.c +@@ -730,7 +730,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])) { +Index: iptables-1.3.8/libiptc/libip6tc.c +=================================================================== +--- iptables-1.3.8.orig/libiptc/libip6tc.c ++++ iptables-1.3.8/libiptc/libip6tc.c +@@ -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/packages/iptables/iptables_1.3.8.bb b/packages/iptables/iptables_1.3.8.bb index 3b63c478ba..8dfb6c7842 100644 --- a/packages/iptables/iptables_1.3.8.bb +++ b/packages/iptables/iptables_1.3.8.bb @@ -3,9 +3,10 @@ HOMEPAGE = "http://www.netfilter.org/" SECTION = "console/utils" LICENSE = "GPL" RRECOMMENDS = "kernel-module-ip-tables kernel-module-iptable-filter" -PR = "r1" +PR = "r2" SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ file://getsockopt-failed.patch;patch=1 \ + file://iptables-use-s6_addr32.patch;patch=1 \ " S = "${WORKDIR}/iptables-${PV}" |