Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2005 21:21:44 +0000
From:      Peter Edwards <peadar.edwards@gmail.com>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: CURRENT: ifconfig tap0 results in core dump
Message-ID:  <34cb7c8405051914212352efd7@mail.gmail.com>
In-Reply-To: <200505192023.j4JKNVLw038968@gate.bitblocks.com>
References:  <428CE843.7040705@savvis.net> <200505192023.j4JKNVLw038968@gate.bitblocks.com>

index | next in thread | previous in thread | raw e-mail

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 <bakul@bitblocks.com> 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.
> 
> Index: ifconfig.c
> ===================================================================
> RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v
> retrieving revision 1.112
> diff -w -u -b -r1.112 ifconfig.c
> --- ifconfig.c	8 Apr 2005 21:37:41 -0000	1.112
> +++ ifconfig.c	19 May 2005 20:14:02 -0000
> @@ -869,7 +869,7 @@
>  		if (allfamilies) {
>  			const struct afswtch *p;
>  			p = af_getbyfamily(info.rti_info[RTAX_IFA]->sa_family);
> -			if (p != NULL)
> +			if (p != NULL && p->af_status != NULL)
>  				p->af_status(s, &info);
>  		} else if (afp->af_af == info.rti_info[RTAX_IFA]->sa_family)
>  			afp->af_status(s, &info);
>


help

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