From: Changli Gao <xiaosuo@gmail.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org, Changli Gao <xiaosuo@gmail.com>
Subject: [PATCH] RAWNAT: fix rawnat_ipv6_mask()
Date: Sat, 29 May 2010 16:10:51 +0800 [thread overview]
Message-ID: <1275120651-18360-1-git-send-email-xiaosuo@gmail.com> (raw)
fix rawnat_ipv6_mask()
I really think it is a typo mistake. :)
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
extensions/xt_RAWNAT.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/xt_RAWNAT.c b/extensions/xt_RAWNAT.c
index f256e4c..063dcbe 100644
--- a/extensions/xt_RAWNAT.c
+++ b/extensions/xt_RAWNAT.c
@@ -48,7 +48,7 @@ rawnat_ipv6_mask(__be32 *addr, const __be32 *repl, unsigned int mask)
break;
case 33 ... 63:
addr[0] = repl[0];
- addr[1] = remask(addr[1], repl[1], mask - 64);
+ addr[1] = remask(addr[1], repl[1], mask - 32);
break;
case 64:
addr[0] = repl[0];
@@ -57,7 +57,7 @@ rawnat_ipv6_mask(__be32 *addr, const __be32 *repl, unsigned int mask)
case 65 ... 95:
addr[0] = repl[0];
addr[1] = repl[1];
- addr[2] = remask(addr[2], repl[2], mask - 96);
+ addr[2] = remask(addr[2], repl[2], mask - 64);
case 96:
addr[0] = repl[0];
addr[1] = repl[1];
@@ -67,7 +67,7 @@ rawnat_ipv6_mask(__be32 *addr, const __be32 *repl, unsigned int mask)
addr[0] = repl[0];
addr[1] = repl[1];
addr[2] = repl[2];
- addr[3] = remask(addr[3], repl[3], mask - 128);
+ addr[3] = remask(addr[3], repl[3], mask - 96);
break;
case 128:
addr[0] = repl[0];
next reply other threads:[~2010-05-29 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 8:10 Changli Gao [this message]
2010-06-12 8:16 ` RAWNAT: fix rawnat_ipv6_mask() Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275120651-18360-1-git-send-email-xiaosuo@gmail.com \
--to=xiaosuo@gmail.com \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).