Re: CURRENT: ifconfig tap0 results in core dump

From: Bakul Shah <bakul_at_BitBlocks.com>
Date: Thu, 19 May 2005 13:23:31 -0700
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
_at__at_ -869,7 +869,7 _at__at_
 		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);
Received on Thu May 19 2005 - 18:23:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:34 UTC