summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-03-17 14:51:28 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-03-17 14:51:28 +0000
commit7f908154a65d1aecf262b84f18b3a5b2cc253630 (patch)
tree6ff9ee71d864eb40244bef117d3409472a5441c0
parentd3b58ab595778414313a17ad505b54a0424c104d (diff)
Merge two "#ifdef NCARP" chunks.
"Look safe" henning@, ok florian@
-rw-r--r--sys/net/if_ethersubr.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index b6358fd4699..3a3bfc16ef6 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.189 2015/02/16 18:24:02 markus Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.190 2015/03/17 14:51:27 mpi Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -293,6 +293,9 @@ ether_output(struct ifnet *ifp0, struct mbuf *m0, struct sockaddr *dst,
(IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
}
+
+ if (ifp0 != ifp && ifp0->if_type == IFT_CARP)
+ esrc = carp_get_srclladdr(ifp0, esrc);
#endif /* NCARP > 0 */
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
@@ -372,11 +375,6 @@ ether_output(struct ifnet *ifp0, struct mbuf *m0, struct sockaddr *dst,
if (mcopy)
(void) looutput(ifp, mcopy, dst, rt);
-#if NCARP > 0
- if (ifp0 != ifp && ifp0->if_type == IFT_CARP)
- esrc = carp_get_srclladdr(ifp0, esrc);
-#endif
-
if (ether_addheader(&m, ifp, etype, esrc, edst) == -1)
senderr(ENOBUFS);