Date: Wed, 26 May 1999 11:53:40 -0400 From: "Chuck Youse" <cyouse@cybersites.com> To: <freebsd-hackers@FreeBSD.ORG>, "Brian Somers" <brian@Awfulhak.org> Subject: Re: Interface UP & RUNNING flags Message-ID: <004001bea78f$eca12be0$4d7b5ccf@f8m7n1>
next in thread | raw e-mail | index | archive | help
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 <brian@Awfulhak.org> To: freebsd-hackers@FreeBSD.ORG <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 <brian@Awfulhak.org> <brian@FreeBSD.org> > <http://www.Awfulhak.org> <brian@OpenBSD.org> >Don't _EVER_ lose your sense of humour ! <brian@uk.FreeBSD.org> > > > > >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004001bea78f$eca12be0$4d7b5ccf>