From 899993d31074f578f315e4b4f151ceaf1dfbf917 Mon Sep 17 00:00:00 2001 From: Changli Gao Date: Fri, 23 Jul 2010 13:27:08 +0200 Subject: [PATCH] --- yaml --- r: 203975 b: refs/heads/master c: c36952e524b2b898a3c9e9b137f64d72d43cd393 h: refs/heads/master i: 203973: 04c3d2248474b43ab162b09476d0f29efc6a4ad5 203971: 546075f18e9dce2d9ae71acadd011e6dcd27786a 203967: dd50236ba5a602061bafe0c0c84f87e560dafad2 v: v3 --- [refs] | 2 +- trunk/net/ipv4/netfilter/nf_nat_core.c | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index b8930307c8b7..f32ce3d7eb98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e8648a1fdb54da1f683784b36a17aa65ea56e931 +refs/heads/master: c36952e524b2b898a3c9e9b137f64d72d43cd393 diff --git a/trunk/net/ipv4/netfilter/nf_nat_core.c b/trunk/net/ipv4/netfilter/nf_nat_core.c index c7719b283ada..037a3a659930 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_core.c +++ b/trunk/net/ipv4/netfilter/nf_nat_core.c @@ -261,14 +261,9 @@ get_unique_tuple(struct nf_conntrack_tuple *tuple, rcu_read_lock(); proto = __nf_nat_proto_find(orig_tuple->dst.protonum); - /* Change protocol info to have some randomization */ - if (range->flags & IP_NAT_RANGE_PROTO_RANDOM) { - proto->unique_tuple(tuple, range, maniptype, ct); - goto out; - } - /* Only bother mapping if it's not already in range and unique */ - if ((!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED) || + if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM) && + (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED) || proto->in_range(tuple, maniptype, &range->min, &range->max)) && !nf_nat_used_tuple(tuple, ct)) goto out;