Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Aug 2004 10:06:17 +0300
From:      Alex Lyashkov <shadow@psoft.net>
To:        Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
Cc:        cokane@cokane.org
Subject:   Re: Network interface RUNNING and UP flags
Message-ID:  <1091862376.7840.3.camel@berloga.shadowland>
In-Reply-To: <41140139.5080803@savvis.net>
References:  <346a8022040806145018a5e18@mail.gmail.com> <41140139.5080803@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
=F7 =F3=C2=D4, 07.08.2004, =D7 01:07, Maksim Yevmenkin =D0=C9=DB=C5=D4:
> > 2) Is there a way to set this interface flag without assigning an IPv4
> > address (or any address for that matter) first?
> >=20
> > Mainly for number two, I would like to be able to run interfaces
> > bridged together without having to also give all of them addresses.
>=20
> please try the attached (untested!) patch. it should set iff_running=20
> flag on the interface as soon as the control device is opened.
>=20
> max
> =20
>  	bcopy(tp->arpcom.ac_enaddr, tp->ether_addr, sizeof(tp->ether_addr));
>  	tp->tap_pid =3D td->td_proc->p_pid;
>  	tp->tap_flags |=3D TAP_OPEN;
+	tp->tap_if.if_flags |=3D IFF_RUNNING;
+	tp->tap_if.if_flags &=3D ~IFF_OACTIVE;
>=20
>  	mtx_unlock(&tp->tap_mtx);
not better move this under tp->tap_mtx mutex without using splX
functions?

--=20
Alex Lyashkov <shadow@psoft.net>
PSoft



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1091862376.7840.3.camel>