summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_proto.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-02-22 13:04:05 +0000
committerglebius <glebius@FreeBSD.org>2005-02-22 13:04:05 +0000
commite1d22638d0a8257ed01b7f95d1b6d5cef74ebd07 (patch)
tree120bc2567ed859da022499edb1691fa4c7bdd908 /sys/netinet6/in6_proto.c
parenta986ceef8da1f3c7f37ca981d799c33b3e6ae3f2 (diff)
downloadFreeBSD-src-e1d22638d0a8257ed01b7f95d1b6d5cef74ebd07.zip
FreeBSD-src-e1d22638d0a8257ed01b7f95d1b6d5cef74ebd07.tar.gz
Add CARP (Common Address Redundancy Protocol), which allows multiple
hosts to share an IP address, providing high availability and load balancing. Original work on CARP done by Michael Shalayeff, with many additions by Marco Pfatschbacher and Ryan McBride. FreeBSD port done solely by Max Laier. Patch by: mlaier Obtained from: OpenBSD (mickey, mcbride)
Diffstat (limited to 'sys/netinet6/in6_proto.c')
-rw-r--r--sys/netinet6/in6_proto.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index 129c5f3..7900303 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -64,6 +64,7 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
+#include "opt_carp.h"
#include <sys/param.h>
#include <sys/socket.h>
@@ -121,6 +122,10 @@
#endif
#endif /* IPSEC */
+#ifdef DEV_CARP
+#include <netinet/ip_carp.h>
+#endif
+
#ifdef FAST_IPSEC
#include <netipsec/ipsec6.h>
#define IPSEC
@@ -241,6 +246,14 @@ struct ip6protosw inet6sw[] = {
0, 0, 0, 0,
&rip6_usrreqs
},
+#ifdef DEV_CARP
+{ SOCK_RAW, &inet6domain, IPPROTO_CARP, PR_ATOMIC|PR_ADDR,
+ carp6_input, rip6_output, 0, rip6_ctloutput,
+ 0,
+ 0, 0, 0, 0,
+ &rip6_usrreqs
+},
+#endif /* DEV_CARP */
/* raw wildcard */
{ SOCK_RAW, &inet6domain, 0, PR_ATOMIC|PR_ADDR,
rip6_input, rip6_output, 0, rip6_ctloutput,
OpenPOWER on IntegriCloud