Subject: Re: gre_output() issue.
To: Sean Boudreau <seanb@qnx.com>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-net
Date: 08/13/2007 21:01:33
On Aug 13, 2007, at 1:43 PM, 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?

Not from me.

>
>
> -seanb
>
>
> Index: net/if_gre.c
> ===================================================================
> RCS file: /cvsroot/src/sys/net/if_gre.c,v
> retrieving revision 1.98
> diff -r1.98 if_gre.c
> 611c611,612
> < 	if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) == 0 ||
> ---
>> 	if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) !=
>> 	    (IFF_UP | IFF_RUNNING) ||

-- thorpej