diff options
author | Jerome Borsboom <j.borsboom@erasmusmc.nl> | 2007-07-08 01:19:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:17:12 -0400 |
commit | f4a607bfae30d15aad46e75d2ed7a39f7ce7708b (patch) | |
tree | aefe93235430427833e0eed936ca80a991d9df0d | |
parent | 7c4e36bc172ae1accde835b880fdc4a2c2a3df57 (diff) |
[NETFILTER]: nf_nat_sip: only perform RTP DNAT if SIP session was SNATed
DNAT of the the RTP session is only necessary if the SIP session has
been SNATed.
Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/netfilter/nf_nat_sip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c index fac97cf51ae5..a32d746c4592 100644 --- a/net/ipv4/netfilter/nf_nat_sip.c +++ b/net/ipv4/netfilter/nf_nat_sip.c | |||
@@ -260,7 +260,11 @@ static unsigned int ip_nat_sdp(struct sk_buff **pskb, | |||
260 | DEBUGP("ip_nat_sdp():\n"); | 260 | DEBUGP("ip_nat_sdp():\n"); |
261 | 261 | ||
262 | /* Connection will come from reply */ | 262 | /* Connection will come from reply */ |
263 | newip = ct->tuplehash[!dir].tuple.dst.u3.ip; | 263 | if (ct->tuplehash[dir].tuple.src.u3.ip == |
264 | ct->tuplehash[!dir].tuple.dst.u3.ip) | ||
265 | newip = exp->tuple.dst.u3.ip; | ||
266 | else | ||
267 | newip = ct->tuplehash[!dir].tuple.dst.u3.ip; | ||
264 | 268 | ||
265 | exp->saved_ip = exp->tuple.dst.u3.ip; | 269 | exp->saved_ip = exp->tuple.dst.u3.ip; |
266 | exp->tuple.dst.u3.ip = newip; | 270 | exp->tuple.dst.u3.ip = newip; |