summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/rtsock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 5ed615dfc9e..3f42b8ddc8b 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.22 2002/07/02 19:38:55 nate Exp $ */
+/* $OpenBSD: rtsock.c,v 1.23 2002/07/03 02:31:00 mickey Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -815,6 +815,8 @@ sysctl_iflist(af, w)
if (w->w_arg && w->w_arg != ifp->if_index)
continue;
ifa = TAILQ_FIRST(&ifp->if_addrlist);
+ if (!ifa)
+ continue;
ifpaddr = ifa->ifa_addr;
len = rt_msg2(RTM_IFINFO, &info, (caddr_t)0, w);
ifpaddr = 0;