summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2009-12-15 13:28:24 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2009-12-15 13:28:24 +0000
commitc318b6be83d369f75f47820624680a7825dfc4de (patch)
treeb57d9b98d398ffc32a22dfce4578fc2a72cd127a /sys/netinet
parent054c64453edc265f6f3066e7d9077fe10180f771 (diff)
Ensure that the interface is valid before trying to access its flags.
ok claudio@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/igmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index bbdd681b69d..11201f04c8f 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: igmp.c,v 1.28 2009/12/15 13:23:53 jsing Exp $ */
+/* $OpenBSD: igmp.c,v 1.29 2009/12/15 13:28:23 jsing Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
@@ -464,6 +464,7 @@ igmp_joingroup(struct in_multi *inm)
inm->inm_state = IGMP_IDLE_MEMBER;
if (!IN_LOCAL_GROUP(inm->inm_addr.s_addr) &&
+ inm->inm_ia->ia_ifp &&
(inm->inm_ia->ia_ifp->if_flags & IFF_LOOPBACK) == 0) {
if ((i = rti_fill(inm)) == -1) {
splx(s);