[iptables] ip6tables: fix printing of ipv6 network masks
Patrick McHardy
netfilter-cvslog-bounces at lists.netfilter.org
Tue Jun 10 15:31:22 CEST 2008
Gitweb: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=48607816796124ce2177ee22645d3fd8180f1e98
commit 48607816796124ce2177ee22645d3fd8180f1e98
Author: Jan Engelhardt <jengelh at medozas.de>
AuthorDate: Tue Jun 10 15:17:53 2008 +0200
Commit: Patrick McHardy <kaber at trash.net>
CommitDate: Tue Jun 10 15:17:53 2008 +0200
ip6tables: fix printing of ipv6 network masks
Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>
via 48607816796124ce2177ee22645d3fd8180f1e98 (commit)
from b432667e1176bf24c8c8ac98dcec76c71688974c (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 48607816796124ce2177ee22645d3fd8180f1e98
Author: Jan Engelhardt <jengelh at medozas.de>
Date: Tue Jun 10 15:17:53 2008 +0200
ip6tables: fix printing of ipv6 network masks
Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>
-----------------------------------------------------------------------
xtables.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>
diff --git a/xtables.c b/xtables.c
index 8241687..a97bdaa 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;
More information about the netfilter-cvslog
mailing list