summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-06-11 10:26:38 +0000
committerbz <bz@FreeBSD.org>2009-06-11 10:26:38 +0000
commitfe42112add1a5987e8d66b6177ed78fe3d5e5749 (patch)
treef98bbcd30eb93d910b0d5de7940c01d2a7e71764 /sys/net/if_ethersubr.c
parent06bce6ca23b25ef22dfc3bccf917d0d8704287ba (diff)
downloadFreeBSD-src-fe42112add1a5987e8d66b6177ed78fe3d5e5749.zip
FreeBSD-src-fe42112add1a5987e8d66b6177ed78fe3d5e5749.tar.gz
carp(4) allows people to share a set of IP addresses and can only
use IPv4/v6 for inter-node communication (according to my reading). Properly wrap the carp callouts in INET || INET6 and refelect this in sys/conf/files as well. While in theory this should be ok, it might be a bit optimistic to think that carp could build with inet6 only[1]. Discussed with: mlaier [1]
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 7c68908..5d536aa 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -79,9 +79,11 @@
#include <netinet6/nd6.h>
#endif
+#if defined(INET) || defined(INET6)
#ifdef DEV_CARP
#include <netinet/ip_carp.h>
#endif
+#endif
#ifdef IPX
#include <netipx/ipx.h>
@@ -393,11 +395,13 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
return (error);
}
+#if defined(INET) || defined(INET6)
#ifdef DEV_CARP
if (ifp->if_carp &&
(error = carp_output(ifp, m, dst, NULL)))
goto bad;
#endif
+#endif
/* Handle ng_ether(4) processing, if any */
if (IFP2AC(ifp)->ac_netgraph != NULL) {
@@ -712,6 +716,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
}
}
+#if defined(INET) || defined(INET6)
#ifdef DEV_CARP
/*
* Clear M_PROMISC on frame so that carp(4) will see it when the
@@ -727,6 +732,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
m->m_flags &= ~M_PROMISC;
} else
#endif
+#endif
{
/*
* If the frame received was not for our MAC address, set the
OpenPOWER on IntegriCloud