From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 7 07:15:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EEAC16A4CE for ; Sat, 7 Aug 2004 07:15:38 +0000 (GMT) Received: from sev.net.ua (sev.net.ua [212.86.233.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id F38CB43D45 for ; Sat, 7 Aug 2004 07:15:36 +0000 (GMT) (envelope-from shadow@psoft.net) Received: from berloga.shadowland ([213.227.237.65]) by sev.net.ua (8.12.11/8.12.9) with ESMTP id i777FQ4Y057735; Sat, 7 Aug 2004 10:15:27 +0300 (EEST) (envelope-from shadow@psoft.net) Received: from berloga.shadowland (berloga.shadowland [127.0.0.1]) by berloga.shadowland (8.12.10/8.12.10) with ESMTP id i777FQAq008605; Sat, 7 Aug 2004 10:15:26 +0300 Received: (from root@localhost) by berloga.shadowland (8.12.10/8.12.10/Submit) id i7776HZW008507; Sat, 7 Aug 2004 10:06:17 +0300 From: Alex Lyashkov To: Maksim Yevmenkin In-Reply-To: <41140139.5080803@savvis.net> References: <346a8022040806145018a5e18@mail.gmail.com> <41140139.5080803@savvis.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: PSoft Message-Id: <1091862376.7840.3.camel@berloga.shadowland> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-1) Date: Sat, 07 Aug 2004 10:06:17 +0300 cc: hackers@freebsd.org cc: cokane@cokane.org Subject: Re: Network interface RUNNING and UP flags X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2004 07:15:38 -0000 =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 PSoft