From owner-freebsd-current@FreeBSD.ORG Thu May 19 21:21:45 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 AE3CE16A4CE for ; Thu, 19 May 2005 21:21:45 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6706B43D9D for ; Thu, 19 May 2005 21:21:44 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: by zproxy.gmail.com with SMTP id 34so761276nzf for ; Thu, 19 May 2005 14:21:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rYCje13UyHajnzkIHCv0NDz9sXTKF/uMlBTywsJBRnh3Ch34iViH40vl7iRt7cJPJuwIC38rae/E8DPe8+AJlSZRbuYUbfhv31mRTf60gHgbQrmrvYlCyxwANpK7J5Ixux1QvTe+fCwNAu7znPDocl+A1G8jjAniiwfd/bn2DxY= Received: by 10.36.157.1 with SMTP id f1mr664908nze; Thu, 19 May 2005 14:21:44 -0700 (PDT) Received: by 10.36.68.15 with HTTP; Thu, 19 May 2005 14:21:43 -0700 (PDT) Message-ID: <34cb7c8405051914212352efd7@mail.gmail.com> Date: Thu, 19 May 2005 21:21:44 +0000 From: Peter Edwards To: Bakul Shah In-Reply-To: <200505192023.j4JKNVLw038968@gate.bitblocks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <428CE843.7040705@savvis.net> <200505192023.j4JKNVLw038968@gate.bitblocks.com> 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 Reply-To: peadar@freebsd.org 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 21:21:45 -0000 Yes, this most likely will make ifconfig work with minimum fuss, but the underlying problem is the bogus data it's getting from the kernel: the kernel patch should fix it by avoiding that circumstance. There are similar tests elsewhere in ifconfig, though, so it's probably reasonable to add this too, I suppose. On 5/19/05, Bakul Shah wrote: > i don't know about the if_tap.c fix but the following at > fixes the segfault in ifconfig.c without any information loss > as far as i can tell. >=20 > Index: ifconfig.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v > retrieving revision 1.112 > diff -w -u -b -r1.112 ifconfig.c > --- ifconfig.c=098 Apr 2005 21:37:41 -0000=091.112 > +++ ifconfig.c=0919 May 2005 20:14:02 -0000 > @@ -869,7 +869,7 @@ > =09=09if (allfamilies) { > =09=09=09const struct afswtch *p; > =09=09=09p =3D af_getbyfamily(info.rti_info[RTAX_IFA]->sa_family); > -=09=09=09if (p !=3D NULL) > +=09=09=09if (p !=3D NULL && p->af_status !=3D NULL) > =09=09=09=09p->af_status(s, &info); > =09=09} else if (afp->af_af =3D=3D info.rti_info[RTAX_IFA]->sa_family) > =09=09=09afp->af_status(s, &info); >