From owner-freebsd-current@FreeBSD.ORG Thu May 19 19:26:24 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0017016A4CE; Thu, 19 May 2005 19:26:23 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0465543D5C; Thu, 19 May 2005 19:26:23 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id A0B303C003; Thu, 19 May 2005 14:26:20 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30707-01-82; Thu, 19 May 2005 14:26:20 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id 7283C3BFF3; Thu, 19 May 2005 14:26:20 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 19 May 2005 14:26:18 -0500 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 19 May 2005 14:25:57 -0500 Message-ID: <428CE843.7040705@savvis.net> Date: Thu, 19 May 2005 12:25:55 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: peadar@freebsd.org References: <790a9fff0505190809428abb15@mail.gmail.com> <34cb7c84050519083477639cd5@mail.gmail.com> In-Reply-To: <34cb7c84050519083477639cd5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 May 2005 19:25:58.0101 (UTC) FILETIME=[956B1050:01C55CA8] X-Virus-Scanned: amavisd-new at savvis.net cc: Matti Saarinen cc: Scot Hetzel cc: freebsd-current@freebsd.org Subject: Re: CURRENT: ifconfig tap0 results in core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2005 19:26:24 -0000 Peter Edwards wrote: >>>% ifconfig tap0 >>>tap0: flags=8802 mtu 1500 >>> inet6 fe80::2bd:9ff:fe7c:100%tap0 prefixlen 64 scopeid 0x5 >>>zsh: segmentation fault (core dumped) ifconfig tap0 >>> >>> >>>I remember that ifconfig didn't dump core when my laptop ran CURRENT >>>from a few months ago. >>> >> >>You'll probably need to build a version of ifconfig with debugging >>symbols. And then provide a backtrace of the core dump. >> >>How soon after killing openvpn, do you use the ifconfig command. It >>might be possible that devfs was in the process of removing tap0, when >>you used the ifconfig command. >> > > Hm. > It looks like the "close" code for if_tap clears out the addresses of > the interface with a pretty blunt-edged "bzero", rather than removing > them in any clean fashion. As a result, ifconfig gets confused over > the address families in the tags it sees on the addresses it > enumerates off the tap interface, and collapses with a corefile. > > if_tap's "close" seems to be trying to do part of what's done in > if_detach, so I split out what I think are the relevant bits from > there and used it in both places. > > Any networking experts care to take a look at the patch? I suspect > there's a whole mess of locking I'm not doing for a start, but I think > it might be an improvement over the current situation. i'm not an expert, but i took a brief look at it, and, it looks fine to me. does this patch fix the ifconfig(8) problem? max