summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-06-10 15:17:53 +0200
committerPatrick McHardy <kaber@trash.net>2008-06-10 15:17:53 +0200
commit48607816796124ce2177ee22645d3fd8180f1e98 (patch)
treed78f5fac6cc2489273b45c65a6a546b9765a634b /xtables.c
parentb432667e1176bf24c8c8ac98dcec76c71688974c (diff)
ip6tables: fix printing of ipv6 network masks
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'xtables.c')
-rw-r--r--xtables.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xtables.c b/xtables.c
index 8241687b..a97bdaad 100644
--- 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;