[NETFILTER]: sip: Fix RTP address NAT
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 May 2007 10:35:31 +0000 (03:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2007 10:35:31 +0000 (03:35 -0700)
commitcfd6c38096d75c8b86782683c5f45c415a505b78
treee89cf155ed3f19bdce288da522e5f1b7445065b9
parentc2a1910b06fed96db77bb358c18c52a1fcf2b7fe
[NETFILTER]: sip: Fix RTP address NAT

I needed to use this recently to talk to a Cisco server.  In my case
I only did SNAT while the Cisco server used a different address for
RTP traffic than the one for SIP.  I discovered that nf_nat_sip NATed
the RTP address to the SIP one which was unnecessary but OK.  However,
in doing so it did not DNAT the destination address on the RTP traffic
to the Cisco back to the original RTP address.

This patch corrects this by noting down the RTP address and using it
when the expectation fires.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_nat_sip.c