Skip to content

Commit

Permalink
netfilter: Fix SIP conntrack build with NAT disabled.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Apr 20, 2008
1 parent 4e9d8a7 commit e1f9a46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/netfilter/nf_conntrack_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb,
nfct_help(exp->master)->helper != nfct_help(ct)->helper ||
exp->class != class)
break;

#ifdef CONFIG_NF_NAT_NEEDED
if (exp->tuple.src.l3num == AF_INET && !direct_rtp &&
(exp->saved_ip != exp->tuple.dst.u3.ip ||
exp->saved_proto.udp.port != exp->tuple.dst.u.udp.port) &&
Expand All @@ -791,6 +791,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb,
tuple.dst.u.udp.port = exp->saved_proto.udp.port;
direct_rtp = 1;
} else
#endif
skip_expect = 1;
} while (!skip_expect);
rcu_read_unlock();
Expand Down

0 comments on commit e1f9a46

Please sign in to comment.