From owner-freebsd-hackers Wed May 26 8:56:33 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1.cybersites.com (unknown [207.92.123.2]) by hub.freebsd.org (Postfix) with ESMTP id 4C0DE153A4 for ; Wed, 26 May 1999 08:55:41 -0700 (PDT) (envelope-from cyouse@cybersites.com) Received: from f8m7n1 (dhcp77.cybersites.com [207.92.123.77]) by ns1.cybersites.com (8.9.3/8.9.3) with SMTP id KAA28964; Wed, 26 May 1999 10:53:40 -0400 Message-ID: <004001bea78f$eca12be0$4d7b5ccf@f8m7n1> From: "Chuck Youse" To: , "Brian Somers" Subject: Re: Interface UP & RUNNING flags Date: Wed, 26 May 1999 11:53:40 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG IFF_RUNNING indicates that "resources are allocated for this device", i.e., everything's ready to go. IFF_UP provides an administrative control over the operational status of the device. Chuck Youse Director of Systems cyouse@cybersites.com -----Original Message----- From: Brian Somers To: freebsd-hackers@FreeBSD.ORG Date: Wednesday, May 26, 1999 7:47 AM Subject: Interface UP & RUNNING flags >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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message