Group :: System/Kernel and hardware
RPM: iptables
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: iptables-1.4.0-up-int6_addr.patch
Download
Download
Use s6_addr32 to access bits in int6_addr instead of incompatible name
Spotted by Khem Raj <raj.khem@gmail.com>
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
ip6tables.c | 2 +-
libiptc/libip6tc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- iptables/ip6tables.c
+++ iptables/ip6tables.c
@@ -678,7 +678,7 @@ parse_hostnetworkmask(const char *name, struct in6_addr **addrpp,
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])) {
--- iptables/libiptc/libip6tc.c
+++ iptables/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)