[iptables] Use s6_addr32 to access bits in int6_addr instead of incompatible name

Patrick McHardy netfilter-cvslog-bounces at lists.netfilter.org
Wed Jun 4 15:29:31 CEST 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=5a2208c3e62a150e6f6297abbfa63056ab4a8066
commit 5a2208c3e62a150e6f6297abbfa63056ab4a8066
Author:     Yasuyuki Kozakai <yasuyuki.kozakai at toshiba.co.jp>
AuthorDate: Wed Jun 4 15:16:03 2008 +0200
Commit:     Patrick McHardy <kaber at trash.net>
CommitDate: Wed Jun 4 15:16:03 2008 +0200

    Use s6_addr32 to access bits in int6_addr instead of incompatible name
    
    Spotted by Khem Raj <raj.khem at gmail.com>
    
    Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai at toshiba.co.jp>
    Signed-off-by: Patrick McHardy <kaber at trash.net>
       via  5a2208c3e62a150e6f6297abbfa63056ab4a8066 (commit)
      from  c634cb9cb13d6e1b6fd661b426363431f7ef321a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5a2208c3e62a150e6f6297abbfa63056ab4a8066
Author: Yasuyuki Kozakai <yasuyuki.kozakai at toshiba.co.jp>
Date:   Wed Jun 4 15:16:03 2008 +0200

    Use s6_addr32 to access bits in int6_addr instead of incompatible name
    
    Spotted by Khem Raj <raj.khem at gmail.com>
    
    Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai at toshiba.co.jp>
    Signed-off-by: Patrick McHardy <kaber at trash.net>

-----------------------------------------------------------------------

 libiptc/libip6tc.c |    2 +-
 xtables.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Spotted by Khem Raj <raj.khem at gmail.com>

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai at toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber at trash.net>

diff --git a/libiptc/libip6tc.c b/libiptc/libip6tc.c
index effbd44..71e262e 100644
--- a/libiptc/libip6tc.c
+++ b/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/xtables.c b/xtables.c
index 743c07b..8241687 100644
--- a/xtables.c
+++ b/xtables.c
@@ -1178,7 +1178,7 @@ void ip6parse_hostnetworkmask(const char *name, struct in6_addr **addrpp,
 	n = *naddrs;
 	for (i = 0, j = 0; i < n; ++i) {
 		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])) {



More information about the netfilter-cvslog mailing list