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 <br...@awfulhak.org>                        <br...@freebsd.org>
      <http://www.Awfulhak.org>                   <br...@openbsd.org>
Don't _EVER_ lose your sense of humour !          <br...@uk.freebsd.org>




To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to