From 4e9d8a70e4a48e146a0eaaa5a666f0a4889d873d Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 19 Apr 2008 17:52:51 -0700 Subject: netfilter: Fix SCTP nat build. We need to select LIBCRC32C. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- net/ipv4/netfilter/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'net') diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 0c95cd5872f..2767841a8ce 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig @@ -259,6 +259,7 @@ config NF_NAT_PROTO_SCTP tristate default NF_NAT && NF_CT_PROTO_SCTP depends on NF_NAT && NF_CT_PROTO_SCTP + select LIBCRC32C config NF_NAT_FTP tristate -- cgit v1.2.3 From e1f9a464026011b3f7d0f7b6dfab3e562e870a46 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 19 Apr 2008 17:53:52 -0700 Subject: 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 Signed-off-by: David S. Miller --- net/netfilter/nf_conntrack_sip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net') diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 65b3ba57a3b..9f490006956 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, 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) && @@ -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(); -- cgit v1.2.3 From 43837b1e6c5aef803d57009a68db18df13e64892 Mon Sep 17 00:00:00 2001 From: Bernard Pidoux Date: Sat, 19 Apr 2008 18:41:51 -0700 Subject: rose: Socket lock was not released before returning to user space ================================================ [ BUG: lock held when returning to user space! ] ------------------------------------------------ xfbbd/3683 is leaving the kernel with locks still held! 1 lock held by xfbbd/3683: #0: (sk_lock-AF_ROSE){--..}, at: [] rose_connect+0x73/0x420 [rose] INFO: task xfbbd:3683 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. xfbbd D 00000246 0 3683 3669 c6965ee0 00000092 c02c5c40 00000246 c0f6b5f0 c0f6b5c0 c0f6b5f0 c0f6b5c0 c0f6b614 c6965f18 c024b74b ffffffff c06ba070 00000000 00000000 00000001 c6ab07c0 c012d450 c0f6b634 c0f6b634 c7b5bf10 c0d6004c c7b5bf10 c6965f40 Call Trace: [] lock_sock_nested+0x6b/0xd0 [] ? autoremove_wake_function+0x0/0x40 [] sock_fasync+0x41/0x150 [] sock_close+0x19/0x40 [] __fput+0xb4/0x170 [] fput+0x18/0x20 [] filp_close+0x3e/0x70 [] sys_close+0x69/0xb0 [] sysenter_past_esp+0x5f/0xa5 ======================= INFO: lockdep is turned off. Signed-off-by: Bernard Pidoux Signed-off-by: David S. Miller --- net/rose/af_rose.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index d1ff3f885c5..1ebf6529440 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -760,8 +760,10 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic); - if (!rose->neighbour) - return -ENETUNREACH; + if (!rose->neighbour) { + err = -ENETUNREACH; + goto out_release; + } rose->lci = rose_new_lci(rose->neighbour); if (!rose->lci) { -- cgit v1.2.3