NetBSD Problem Report #39305

From  Wed Aug  6 19:29:08 2008
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id B70AC63B853
	for <>; Wed,  6 Aug 2008 19:29:08 +0000 (UTC)
Message-Id: <>
Date: Wed,  6 Aug 2008 13:26:31 -0500 (CDT)
Subject: loops through gre(4) cause a hang or crash
X-Send-Pr-Version: 3.95

>Number:         39305
>Category:       kern
>Synopsis:       loops through gre(4) cause a hang or crash
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    dyoung
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 06 19:30:00 +0000 2008
>Last-Modified:  Wed Aug 06 21:09:47 +0000 2008
>Originator:     David Young
>Release:        NetBSD 4.99.70
OJC Technologies * Urbana, Illinois
System: NetBSD cuw 4.99.70 NetBSD 4.99.70 (elan) #0: Fri Jul 18 17:21:29 CDT 2008 i386
Architecture: i386
Machine: i386
If a gre(4) is configured with inner destination address equal to
outer destination address, the kernel will loop forever trying
to deliver packets that pass through that gre(4) instance.
ifconfig gre0 create inet$SIX $SRC0 $DST tunnel inet$SIX $SRC1 $DST
ifconfig gre0 up
ping$SIX $DST
Short-term: as packets traverse a gre(4), tag them in gre_output()
        with an identifier for that gre instance.  But first check
        packets in gre_output() for that instance's tag.  If the
        instance tag is already present, send an ICMP/ICMPv6 error
        response to the sender to indicate the loop.

Long-term: in addition to the above, let us configure two routes
	to any destination---i.e., multipath routing.  Qualify a
	gre(4)'s outer destination address so that it resolves to
	a different route than the route to itself.  Use route
	metrics (say) to make the system prefer the route through



Responsible-Changed-From-To: kern-bug-people->dyoung
Responsible-Changed-When: Wed, 06 Aug 2008 21:09:47 +0000
I'll fix it in time for 5.0.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.