]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ip6tables: fix printing of ipv6 network masks
authorJan Engelhardt <jengelh@medozas.de>
Tue, 10 Jun 2008 13:17:53 +0000 (15:17 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 10 Jun 2008 13:17:53 +0000 (15:17 +0200)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
xtables.c

index 8241687b8f5c57907458d8dddcbc84984d2cc719..a97bdaad47cda1bc32be2b3c8d28c6ea1d0c6625 100644 (file)
--- a/xtables.c
+++ b/xtables.c
@@ -1011,10 +1011,10 @@ static int ip6addr_prefix_length(const struct in6_addr *k)
        unsigned int bits = 0;
        uint32_t a, b, c, d;
 
-       a = k->s6_addr32[0];
-       b = k->s6_addr32[1];
-       c = k->s6_addr32[2];
-       d = k->s6_addr32[3];
+       a = ntohl(k->s6_addr32[0]);
+       b = ntohl(k->s6_addr32[1]);
+       c = ntohl(k->s6_addr32[2]);
+       d = ntohl(k->s6_addr32[3]);
        while (a & 0x80000000U) {
                ++bits;
                a <<= 1;