diff options
author | bz <bz@FreeBSD.org> | 2009-06-11 10:26:38 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-06-11 10:26:38 +0000 |
commit | fe42112add1a5987e8d66b6177ed78fe3d5e5749 (patch) | |
tree | f98bbcd30eb93d910b0d5de7940c01d2a7e71764 /sys/net/if.c | |
parent | 06bce6ca23b25ef22dfc3bccf917d0d8704287ba (diff) | |
download | FreeBSD-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.c')
-rw-r--r-- | sys/net/if.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index c95de07..baf6939 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -86,9 +86,11 @@ #include <netinet/if_ether.h> #include <netinet/vinet.h> #endif +#if defined(INET) || defined(INET6) #ifdef DEV_CARP #include <netinet/ip_carp.h> #endif +#endif #include <security/mac/mac_framework.h> @@ -1738,10 +1740,12 @@ if_unroute(struct ifnet *ifp, int flag, int fam) pfctlinput(PRC_IFDOWN, ifa->ifa_addr); ifp->if_qflush(ifp); +#if defined(INET) || defined(INET6) #ifdef DEV_CARP if (ifp->if_carp) carp_carpdev_state(ifp->if_carp); #endif +#endif rt_ifmsg(ifp); } @@ -1762,10 +1766,12 @@ if_route(struct ifnet *ifp, int flag, int fam) TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) if (fam == PF_UNSPEC || (fam == ifa->ifa_addr->sa_family)) pfctlinput(PRC_IFUP, ifa->ifa_addr); +#if defined(INET) || defined(INET6) #ifdef DEV_CARP if (ifp->if_carp) carp_carpdev_state(ifp->if_carp); #endif +#endif rt_ifmsg(ifp); #ifdef INET6 in6_if_up(ifp); @@ -1816,10 +1822,12 @@ do_link_state_change(void *arg, int pending) if ((ifp->if_type == IFT_ETHER || ifp->if_type == IFT_L2VLAN) && IFP2AC(ifp)->ac_netgraph != NULL) (*ng_ether_link_state_p)(ifp, link_state); +#if defined(INET) || defined(INET6) #ifdef DEV_CARP if (ifp->if_carp) carp_carpdev_state(ifp->if_carp); #endif +#endif if (ifp->if_bridge) { KASSERT(bstp_linkstate_p != NULL,("if_bridge bstp not loaded!")); (*bstp_linkstate_p)(ifp, link_state); |