summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-01-17 05:42:40 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-01-17 05:42:40 +0000
commitf6f17cd807cfe703c43ebc1fd265101095d0a7f9 (patch)
treef430020513c0d05fe074f184607dc4ac400407b4 /sys/net
parentc2671a1a70729ffdbc02c4fe97d0deee16d3ec54 (diff)
remove IFF_RUNNING if it becomes !IFF_UP.
pointed out by: deraadt
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_gif.c7
1 files changed, 6 insertions, 1 deletions
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: