summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-04-17 01:32:29 +0200
committerDavid S. Miller <davem@davemloft.net>2009-04-17 01:32:29 +0200
commit134ffb4cad92a6aa534e55a9be145bca780a32c1 (patch)
treebe2b312eefbe4b38e81efb384fda4d8fdfae9943 /net/ipv4
parentixgbe: Be explict with what we are !'ing in ixgbe_sfp_config_module_task() (diff)
parentnetfilter: nf_nat: add support for persistent mappings (diff)
downloadlinux-134ffb4cad92a6aa534e55a9be145bca780a32c1.tar.xz
linux-134ffb4cad92a6aa534e55a9be145bca780a32c1.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/nf_nat_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index fe65187810f0..3229e0a81ba6 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -211,7 +211,8 @@ find_best_ips_proto(struct nf_conntrack_tuple *tuple,
minip = ntohl(range->min_ip);
maxip = ntohl(range->max_ip);
j = jhash_2words((__force u32)tuple->src.u3.ip,
- (__force u32)tuple->dst.u3.ip, 0);
+ range->flags & IP_NAT_RANGE_PERSISTENT ?
+ (__force u32)tuple->dst.u3.ip : 0, 0);
j = ((u64)j * (maxip - minip + 1)) >> 32;
*var_ipp = htonl(minip + j);
}