summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_nbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/nd6_nbr.c')
-rw-r--r--sys/netinet6/nd6_nbr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 174f0759a81..167679bbb5f 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.125 2018/12/06 08:11:52 claudio Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.126 2018/12/07 10:01:06 florian Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -891,6 +891,12 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
int icmp6len, maxlen;
caddr_t mac = NULL;
+#if NCARP > 0
+ /* Do not send NAs for carp addresses if we're not the CARP master. */
+ if (ifp->if_type == IFT_CARP && !carp_iamatch(ifp))
+ return;
+#endif
+
/* estimate the size of message */
maxlen = sizeof(*ip6) + sizeof(*nd_na);
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
@@ -1009,12 +1015,6 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
} else
flags &= ~ND_NA_FLAG_OVERRIDE;
-#if NCARP > 0
- /* Do not send NAs for carp addresses if we're not the CARP master. */
- if (ifp->if_type == IFT_CARP && !carp_iamatch(ifp))
- goto bad;
-#endif
-
ip6->ip6_plen = htons((u_short)icmp6len);
nd_na->nd_na_flags_reserved = flags;
nd_na->nd_na_cksum = 0;