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
÷ óÂÔ, 07.08.2004, × 01:07, Maksim Yevmenkin ÐÉÛÅÔ: > > 2) Is there a way to set this interface flag without assigning an IPv4 > > address (or any address for that matter) first? > > > > Mainly for number two, I would like to be able to run interfaces > > bridged together without having to also give all of them addresses. > > please try the attached (untested!) patch. it should set iff_running > flag on the interface as soon as the control device is opened. > > max > > bcopy(tp->arpcom.ac_enaddr, tp->ether_addr, sizeof(tp->ether_addr)); > tp->tap_pid = td->td_proc->p_pid; > tp->tap_flags |= TAP_OPEN; + tp->tap_if.if_flags |= IFF_RUNNING; + tp->tap_if.if_flags &= ~IFF_OACTIVE; > > mtx_unlock(&tp->tap_mtx); not better move this under tp->tap_mtx mutex without using splX functions? -- 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>
