summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-12-21 10:28:36 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-12-21 10:28:36 +0000
commit4928dc84a8e0bcbbce32bbff4a8d2334925afed3 (patch)
treebff41986a1186adc1fe3cbd4505385f600298a17 /sys/netinet6
parent45b5bcaf0f862bdc262252f9cfebb4a68427c929 (diff)
Check that if_type != IFT_CARP before using ifp->if_carp.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6_nbr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index da0e4adac9b..a955650ac5e 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.34 2004/10/28 20:34:57 henning Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.35 2004/12/21 10:28:35 mcbride Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -193,7 +193,7 @@ nd6_ns_input(m, off, icmp6len)
*/
/* (1) and (3) check. */
#if NCARP > 0
- if (ifp->if_carp)
+ if (ifp->if_carp && ifp->if_type != IFT_CARP)
ifa = carp_iamatch6(ifp->if_carp, &taddr6);
if (!ifa)
ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
@@ -939,7 +939,7 @@ nd6_na_output(ifp, daddr6, taddr6, flags, tlladdr, sdl0)
*/
if (sdl0 == NULL) {
#if NCARP > 0
- if (ifp->if_carp)
+ if (ifp->if_carp && ifp->if_type != IFT_CARP)
mac = carp_macmatch6(ifp->if_carp, m, taddr6);
if (mac == NULL)
mac = nd6_ifptomac(ifp);