netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 6/6] IPv6: Fix infinite loop if no matching IPv6 tunnel found
@ 2006-11-02 11:39 Ville Nuorvala
  2006-11-02 12:59 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 9+ messages in thread
From: Ville Nuorvala @ 2006-11-02 11:39 UTC (permalink / raw)
  To: David S. Miller; +Cc: YOSHIFUJI Hideaki, netdev

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0006-IPv6-Fix-infinite-loop-if-no-matching-IPv6-tunnel-found.txt --]
[-- Type: text/plain, Size: 1008 bytes --]

>From d9ecea2b1d88bc8702f70fbbca7cde2afb8312ee Mon Sep 17 00:00:00 2001
From: Ville Nuorvala <vnuorval@tcs.hut.fi>
Date: Thu, 2 Nov 2006 13:07:35 +0200
Subject: [PATCH 6/6] IPv6: Fix infinite loop if no matching IPv6 tunnel found

If no matching IPv6 tunnel was found ip6ip6_rcv() would cause
ip6_input_finish() to resubmit the same skb to ip6ip6_rcv().

Many thanks to Tero Kauppinen at Ericsson for reporting this issue.

Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
---
 net/ipv6/ip6_tunnel.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 4f64ed7..603ed0d 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -565,11 +565,11 @@ ip6ip6_rcv(struct sk_buff *skb)
 		return 0;
 	}
 	read_unlock(&ip6ip6_lock);
-	return 1;
-
+	icmpv6_send(skb, ICMPV6_DEST_UNREACH,
+		    ICMPV6_ADDR_UNREACH, 0, skb->dev);
 discard:
 	kfree_skb(skb);
-	return 0;
+	return -1;
 }
 
 struct ipv6_tel_txoption {
-- 
1.4.3.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-11-25  1:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-02 11:39 [PATCH 6/6] IPv6: Fix infinite loop if no matching IPv6 tunnel found Ville Nuorvala
2006-11-02 12:59 ` YOSHIFUJI Hideaki / 吉藤英明
     [not found]   ` <4549EFA7.50004@tcs.hut.fi>
2006-11-02 14:18     ` YOSHIFUJI Hideaki / 吉藤英明
2006-11-02 14:22       ` Ville Nuorvala
2006-11-14  0:57         ` David Miller
2006-11-14 13:16           ` Ville Nuorvala
2006-11-25  1:12             ` David Miller
2006-11-03  9:08       ` Ville Nuorvala
2006-11-03 10:26         ` Tero Kauppinen (JO/LMF)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).