aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/nf_nat_core.c3
-rw-r--r--net/ipv4/netfilter/nf_nat_rule.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index e848d8d6292..deab27facba 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -77,7 +77,8 @@ static inline unsigned int
77hash_by_src(const struct nf_conntrack_tuple *tuple) 77hash_by_src(const struct nf_conntrack_tuple *tuple)
78{ 78{
79 /* Original src, to ensure we map it consistently if poss. */ 79 /* Original src, to ensure we map it consistently if poss. */
80 return jhash_3words((__force u32)tuple->src.u3.ip, tuple->src.u.all, 80 return jhash_3words((__force u32)tuple->src.u3.ip,
81 (__force u32)tuple->src.u.all,
81 tuple->dst.protonum, 0) % nf_nat_htable_size; 82 tuple->dst.protonum, 0) % nf_nat_htable_size;
82} 83}
83 84
diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c
index 0f45427e5fd..76ec59ae524 100644
--- a/net/ipv4/netfilter/nf_nat_rule.c
+++ b/net/ipv4/netfilter/nf_nat_rule.c
@@ -192,7 +192,7 @@ alloc_null_binding_confirmed(struct nf_conn *ct, unsigned int hooknum)
192 = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC 192 = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC
193 ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip 193 ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip
194 : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip); 194 : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip);
195 u_int16_t all 195 __be16 all
196 = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC 196 = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC
197 ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.all 197 ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.all
198 : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u.all); 198 : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u.all);