Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143859
b: refs/heads/master
c: 98d500d
h: refs/heads/master
i:
  143857: eba22e8
  143855: f4217f3
v: v3
  • Loading branch information
Patrick McHardy committed Apr 16, 2009
1 parent 30d6093 commit 237db9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 38fb0afcd8761f8858e27135ed89a65117e2019c
refs/heads/master: 98d500d66cb7940747b424b245fc6a51ecfbf005
1 change: 1 addition & 0 deletions trunk/include/net/netfilter/nf_nat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum nf_nat_manip_type
#define IP_NAT_RANGE_MAP_IPS 1
#define IP_NAT_RANGE_PROTO_SPECIFIED 2
#define IP_NAT_RANGE_PROTO_RANDOM 4
#define IP_NAT_RANGE_PERSISTENT 8

/* NAT sequence number modifications */
struct nf_nat_seq {
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/netfilter/nf_nat_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 237db9f

Please sign in to comment.