Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4a607bfae30d15aad46e75d2ed7a39f7ce7708b
Commit:     f4a607bfae30d15aad46e75d2ed7a39f7ce7708b
Parent:     7c4e36bc172ae1accde835b880fdc4a2c2a3df57
Author:     Jerome Borsboom <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 7 22:19:48 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 22:17:12 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 fac97cf..a32d746 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,
        DEBUGP("ip_nat_sdp():\n");
 
        /* Connection will come from reply */
-       newip = ct->tuplehash[!dir].tuple.dst.u3.ip;
+       if (ct->tuplehash[dir].tuple.src.u3.ip ==
+           ct->tuplehash[!dir].tuple.dst.u3.ip)
+               newip = exp->tuple.dst.u3.ip;
+       else
+               newip = ct->tuplehash[!dir].tuple.dst.u3.ip;
 
        exp->saved_ip = exp->tuple.dst.u3.ip;
        exp->tuple.dst.u3.ip = newip;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to