netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv6/sit.c: return unhandled skb to tunnel4_rcv
@ 2010-11-30  5:32 David McCullough
  2010-11-30  6:12 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: David McCullough @ 2010-11-30  5:32 UTC (permalink / raw)
  To: netdev


Hi all,

I found a problem using an IPv6 over IPv4 tunnel.  When CONFIG_IPV6_SIT
was enabled, the packets would be rejected as net/ipv6/sit.c was catching
all IPPROTO_IPV6 packets and returning an ICMP port unreachable error.

I think this patch fixes the problem cleanly.  I believe the code in
net/ipv4/tunnel4.c:tunnel4_rcv takes care of it properly if none of the
handlers claim the skb.

Patch is against 2.6.35,  bit still applies to current.

Cheers,
Davidm

Signed-off-by: David McCullough <david_mccullough@mcafee.com>

diff -u -r1.1.1.45 sit.c
--- a/net/ipv6/sit.c	12 Aug 2010 00:16:26 -0000	1.1.1.45
+++ b/net/ipv6/sit.c	30 Nov 2010 05:01:19 -0000
@@ -575,8 +575,9 @@
 		return 0;
 	}
 
-	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
+	/* no tunnel matched,  let upstream know, ipsec may handle it */
 	rcu_read_unlock();
+	return 1;
 out:
 	kfree_skb(skb);
 	return 0;

-- 
David McCullough,      david_mccullough@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear      http://www.mcafee.com         http://www.uCdot.org

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

* Re: [PATCH] net/ipv6/sit.c: return unhandled skb to tunnel4_rcv
  2010-11-30  5:32 [PATCH] net/ipv6/sit.c: return unhandled skb to tunnel4_rcv David McCullough
@ 2010-11-30  6:12 ` Eric Dumazet
  2010-12-01 21:19   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2010-11-30  6:12 UTC (permalink / raw)
  To: David McCullough; +Cc: netdev

Le mardi 30 novembre 2010 à 15:32 +1000, David McCullough a écrit :
> Hi all,
> 
> I found a problem using an IPv6 over IPv4 tunnel.  When CONFIG_IPV6_SIT
> was enabled, the packets would be rejected as net/ipv6/sit.c was catching
> all IPPROTO_IPV6 packets and returning an ICMP port unreachable error.
> 
> I think this patch fixes the problem cleanly.  I believe the code in
> net/ipv4/tunnel4.c:tunnel4_rcv takes care of it properly if none of the
> handlers claim the skb.
> 
> Patch is against 2.6.35,  bit still applies to current.
> 
> Cheers,
> Davidm
> 
> Signed-off-by: David McCullough <david_mccullough@mcafee.com>
> 
> diff -u -r1.1.1.45 sit.c
> --- a/net/ipv6/sit.c	12 Aug 2010 00:16:26 -0000	1.1.1.45
> +++ b/net/ipv6/sit.c	30 Nov 2010 05:01:19 -0000
> @@ -575,8 +575,9 @@
>  		return 0;
>  	}
>  
> -	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
> +	/* no tunnel matched,  let upstream know, ipsec may handle it */
>  	rcu_read_unlock();
> +	return 1;
>  out:
>  	kfree_skb(skb);
>  	return 0;
> 

Good catch !

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>




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

* Re: [PATCH] net/ipv6/sit.c: return unhandled skb to tunnel4_rcv
  2010-11-30  6:12 ` Eric Dumazet
@ 2010-12-01 21:19   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-12-01 21:19 UTC (permalink / raw)
  To: eric.dumazet; +Cc: david_mccullough, netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 30 Nov 2010 07:12:44 +0100

> Le mardi 30 novembre 2010 à 15:32 +1000, David McCullough a écrit :
>> Hi all,
>> 
>> I found a problem using an IPv6 over IPv4 tunnel.  When CONFIG_IPV6_SIT
>> was enabled, the packets would be rejected as net/ipv6/sit.c was catching
>> all IPPROTO_IPV6 packets and returning an ICMP port unreachable error.
>> 
>> I think this patch fixes the problem cleanly.  I believe the code in
>> net/ipv4/tunnel4.c:tunnel4_rcv takes care of it properly if none of the
>> handlers claim the skb.
>> 
>> Patch is against 2.6.35,  bit still applies to current.
>> 
>> Cheers,
>> Davidm
>> 
>> Signed-off-by: David McCullough <david_mccullough@mcafee.com>
 ...
> Good catch !
> 
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2010-12-01 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30  5:32 [PATCH] net/ipv6/sit.c: return unhandled skb to tunnel4_rcv David McCullough
2010-11-30  6:12 ` Eric Dumazet
2010-12-01 21:19   ` David Miller

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).