Subject: Re: gre_output() issue.
To: David Young <dyoung@pobox.com>
From: Sean Boudreau <seanb@qnx.com>
List: tech-net
Date: 08/14/2007 09:42:13
On Tue, Aug 14, 2007 at 01:50:44AM -0400, David Young wrote:
> On Mon, Aug 13, 2007 at 04:43:21PM -0400, Sean Boudreau wrote:
> > 
> > Hi:
> > 
> > gre_output() isn't checking IFF_RUNNING | IFF_UP
> > properly.  The interesting case is when gre_compute_route()
> > fails and IFF_RUNNING is knocked down but IFF_UP is left
> > set.  A recursion lock up can result.
> > 
> > Any objections before I commit?
> 
> No objections.  Can you say more about the recursion lock-up?

Committed.

You could reproduce the issue as follows where the inner and
outer addrs are the same.  This would cause my 3.1 box to
reboot.  My 4.0 box would lock hard: probably some spin scenario
after the refactoring to a separate kthread...

# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
# route flush > /dev/null
# ifconfig gre0 create
# ifconfig gre0 11.0.0.1 11.0.0.2
# ifconfig gre0 tunnel 11.0.0.1 11.0.0.2
# ping -n 11.0.0.2

-seanb