Subject: gre_output() issue.
To: None <tech-net@NetBSD.org>
From: Sean Boudreau <seanb@qnx.com>
List: tech-net
Date: 08/13/2007 16:43:21
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?

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