Hi, This patch fixes a soft lockup in ip6_tunnel when not using xfrm6_tunnel (CONFIG_INET6_TUNNEL). It is triggered when an encapsula- ted packet reaches ip6ip6_rcv() and there is no tunnel associated with it. The error path returns a positive value (1) which will trigger ip6_input to re-submit the packet for processing. As no skb parameters have been changed, ip6ip6_rcv() will continue to be called with the exact same context. Also, ip6ip6_rcv() should free the skb when discarding it.
Signed-off-by: Hugo Santos <[EMAIL PROTECTED]>
--- linux-2.6.16/net/ipv6/ip6_tunnel.c.orig 2006-03-23 16:19:19.000000000
+0000
+++ linux-2.6.16/net/ipv6/ip6_tunnel.c 2006-03-24 11:19:51.000000000 +0000
@@ -557,7 +557,12 @@ ip6ip6_rcv(struct sk_buff **pskb)
read_unlock(&ip6ip6_lock);
icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
discard:
- return 1;
+ /* If xfrm6_tunnel is being used, it will free the skb
+ * otherwise we must do it */
+#ifndef CONFIG_INET6_TUNNEL
+ kfree_skb(skb);
+#endif
+ return -1;
}
static inline struct ipv6_txoptions *create_tel(__u8 encap_limit)
signature.asc
Description: Digital signature
