From: "Changli Gao" <xiaosuo@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: Fwd: [PATCH] nf_nat_core: eliminate find_appropriate_src call if range is set IP_NAT_RANGE_PROTO_RANDOM bit on
Date: Mon, 30 Jun 2008 16:00:43 +0800 [thread overview]
Message-ID: <412e6f7f0806300100t6bc37635pc922405705f1784d@mail.gmail.com> (raw)
In-Reply-To: <412e6f7f0806292132l18c747d6h982c64ce7c9d9c85@mail.gmail.com>
---------- Forwarded message ----------
From: Changli Gao <xiaosuo@gmail.com>
Date: 2008/6/30
Subject: [PATCH] nf_nat_core: eliminate find_appropriate_src call if
range is set IP_NAT_RANGE_PROTO_RANDOM bit on
To: netfilter-devel@lists.netfilter.org
Cc: Changli Gao <xiaosuo@gmail.com>
Eliminate find_appropriate_src call if range is set
IP_NAT_RANGE_PROTO_RANDOM bit on.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
nf_nat_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- net/ipv4/netfilter/nf_nat_core.c.orig 2008-06-30
11:12:26.000000000 +0800
+++ net/ipv4/netfilter/nf_nat_core.c 2008-06-30 12:22:23.000000000 +0800
@@ -240,12 +240,12 @@
This is only required for source (ie. NAT/masq) mappings.
So far, we don't do local source mappings, so multiple
manips not an issue. */
- if (maniptype == IP_NAT_MANIP_SRC) {
+ if (maniptype == IP_NAT_MANIP_SRC &&
+ !(range->flags & IP_NAT_RANGE_PROTO_RANDOM)) {
if (find_appropriate_src(orig_tuple, tuple, range)) {
pr_debug("get_unique_tuple: Found current src map\n");
- if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM))
- if (!nf_nat_used_tuple(tuple, ct))
- return;
+ if (!nf_nat_used_tuple(tuple, ct))
+ return;
}
}
--
Regards,
Changli Gao(xiaosuo@gmail.com)
--
Regards,
Changli Gao(xiaosuo@gmail.com)
next parent reply other threads:[~2008-06-30 8:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <412e6f7f0806292132l18c747d6h982c64ce7c9d9c85@mail.gmail.com>
2008-06-30 8:00 ` Changli Gao [this message]
2008-06-30 12:54 ` Fwd: [PATCH] nf_nat_core: eliminate find_appropriate_src call if range is set IP_NAT_RANGE_PROTO_RANDOM bit on Patrick McHardy
2008-06-30 13:34 ` Changli Gao
2008-07-07 11:24 ` Patrick McHardy
2008-07-08 2:50 ` Changli Gao
2008-07-09 16:54 ` Patrick McHardy
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=412e6f7f0806300100t6bc37635pc922405705f1784d@mail.gmail.com \
--to=xiaosuo@gmail.com \
--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