From f6f17cd807cfe703c43ebc1fd265101095d0a7f9 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Mon, 17 Jan 2000 05:42:40 +0000 Subject: remove IFF_RUNNING if it becomes !IFF_UP. pointed out by: deraadt --- sys/net/if_gif.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/net') diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index dcb9465aa69..9a0de03f5e2 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.5 2000/01/12 06:40:45 angelos Exp $ */ +/* $OpenBSD: if_gif.c,v 1.6 2000/01/17 05:42:39 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -375,6 +375,11 @@ gif_ioctl(ifp, cmd, data) break; case SIOCSIFFLAGS: + /* sync "running" with "up" */ + if (ifp->if_flags & IFF_UP) + ifp->if_flags |= IFF_RUNNING; + else + ifp->if_flags &= ~IFF_RUNNING; break; default: -- cgit v1.2.3