提交 e1f9a464 编写于 作者: P Patrick McHardy 提交者: David S. Miller

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: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4e9d8a70
...@@ -781,7 +781,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, ...@@ -781,7 +781,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb,
nfct_help(exp->master)->helper != nfct_help(ct)->helper || nfct_help(exp->master)->helper != nfct_help(ct)->helper ||
exp->class != class) exp->class != class)
break; break;
#ifdef CONFIG_NF_NAT_NEEDED
if (exp->tuple.src.l3num == AF_INET && !direct_rtp && if (exp->tuple.src.l3num == AF_INET && !direct_rtp &&
(exp->saved_ip != exp->tuple.dst.u3.ip || (exp->saved_ip != exp->tuple.dst.u3.ip ||
exp->saved_proto.udp.port != exp->tuple.dst.u.udp.port) && 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,6 +791,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb,
tuple.dst.u.udp.port = exp->saved_proto.udp.port; tuple.dst.u.udp.port = exp->saved_proto.udp.port;
direct_rtp = 1; direct_rtp = 1;
} else } else
#endif
skip_expect = 1; skip_expect = 1;
} while (!skip_expect); } while (!skip_expect);
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册