diff options
author | Patrick McHardy <kaber@trash.net> | 2008-04-19 20:53:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-19 20:53:52 -0400 |
commit | e1f9a464026011b3f7d0f7b6dfab3e562e870a46 (patch) | |
tree | 48cb0d536b0a751a5c3d6296979270739b254a85 | |
parent | 4e9d8a70e4a48e146a0eaaa5a666f0a4889d873d (diff) |
netfilter: Fix SIP conntrack build with NAT disabled.
Reported by Ingo Molnar.
The SIP helper is also useful without NAT. This patch adds an ifdef
around the RTP call optimization for NATed clients.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 65b3ba57a3b7..9f4900069561 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -781,7 +781,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, | |||
781 | nfct_help(exp->master)->helper != nfct_help(ct)->helper || | 781 | nfct_help(exp->master)->helper != nfct_help(ct)->helper || |
782 | exp->class != class) | 782 | exp->class != class) |
783 | break; | 783 | break; |
784 | 784 | #ifdef CONFIG_NF_NAT_NEEDED | |
785 | if (exp->tuple.src.l3num == AF_INET && !direct_rtp && | 785 | if (exp->tuple.src.l3num == AF_INET && !direct_rtp && |
786 | (exp->saved_ip != exp->tuple.dst.u3.ip || | 786 | (exp->saved_ip != exp->tuple.dst.u3.ip || |
787 | exp->saved_proto.udp.port != exp->tuple.dst.u.udp.port) && | 787 | exp->saved_proto.udp.port != exp->tuple.dst.u.udp.port) && |
@@ -791,6 +791,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, | |||
791 | tuple.dst.u.udp.port = exp->saved_proto.udp.port; | 791 | tuple.dst.u.udp.port = exp->saved_proto.udp.port; |
792 | direct_rtp = 1; | 792 | direct_rtp = 1; |
793 | } else | 793 | } else |
794 | #endif | ||
794 | skip_expect = 1; | 795 | skip_expect = 1; |
795 | } while (!skip_expect); | 796 | } while (!skip_expect); |
796 | rcu_read_unlock(); | 797 | rcu_read_unlock(); |