From owner-freebsd-hackers Wed May 26 5:48:55 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from storm.FreeBSD.org.uk (storm.freebsd.org.uk [194.242.128.198]) by hub.freebsd.org (Postfix) with ESMTP id B631B150EA for ; Wed, 26 May 1999 05:48:53 -0700 (PDT) (envelope-from brian@keep.lan.Awfulhak.org) Received: from keep.lan.Awfulhak.org (keep.lan.Awfulhak.org [172.16.0.8]) by storm.FreeBSD.org.uk (8.9.3/8.9.3) with ESMTP id NAA98582 for ; Wed, 26 May 1999 13:48:51 +0100 (BST) (envelope-from brian@keep.lan.Awfulhak.org) Received: from keep.lan.Awfulhak.org (localhost [127.0.0.1]) by keep.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id NAA00647 for ; Wed, 26 May 1999 13:48:17 +0100 (BST) (envelope-from brian@keep.lan.Awfulhak.org) Message-Id: <199905261248.NAA00647@keep.lan.Awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: freebsd-hackers@FreeBSD.org Subject: Interface UP & RUNNING flags Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 May 1999 13:48:16 +0100 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, Can someone tell me the difference between the IFF_UP and IFF_RUNNING flags ? Currently, the tun pseudo-device never bothers removing the RUNNING flag. This can easily be fixed with Index: if_tun.c =================================================================== RCS file: /home/ncvs/src/sys/net/if_tun.c,v retrieving revision 1.55 diff -u -r1.55 if_tun.c --- if_tun.c 1999/05/06 18:12:54 1.55 +++ if_tun.c 1999/05/26 12:30:55 @@ -210,6 +210,13 @@ } splx(s); } + + if (ifp->if_flags & IFF_RUNNING) { + s = splimp(); + ifp->if_flags &= ~IFF_RUNNING; + splx(s); + } + funsetown(tp->tun_sigio); selwakeup(&tp->tun_rsel); But is this the right fix ? Should IFF_RUNNING be removed with the last address - for *all* interfaces ? Cheers. -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message