From eb2a391f14a08aa64a5dcb4b89e90dabb1158f15 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 20 May 2005 03:58:53 +0000 Subject: [PATCH] guard against bogus address data Submitted by: Bakul Shah --- sbin/ifconfig/ifconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index b95a7a5c2af3..5c337b3baa9f 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -869,7 +869,7 @@ status(const struct afswtch *afp, int addrcount, struct sockaddr_dl *sdl, 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);