summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_proto.c
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2010-08-11 00:51:50 +0000
committerwill <will@FreeBSD.org>2010-08-11 00:51:50 +0000
commitaa4e762c4a720fc3e1b4d3f08d09c5b65bb07735 (patch)
tree5194d90f80d5d4fac28f6f736d5c02cf80511112 /sys/netinet/in_proto.c
parent8afd703de9fc0419708d83e8c31c1f0facca78dd (diff)
downloadFreeBSD-src-aa4e762c4a720fc3e1b4d3f08d09c5b65bb07735.zip
FreeBSD-src-aa4e762c4a720fc3e1b4d3f08d09c5b65bb07735.tar.gz
Allow carp(4) to be loaded as a kernel module. Follow precedent set by
bridge(4), lagg(4) etc. and make use of function pointers and pf_proto_register() to hook carp into the network stack. Currently, because of the uncertainty about whether the unload path is free of race condition panics, unloads are disallowed by default. Compiling with CARPMOD_CAN_UNLOAD in CFLAGS removes this anti foot shooting measure. This commit requires IP6PROTOSPACER, introduced in r211115. Reviewed by: bz, simon Approved by: ken (mentor) MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/in_proto.c')
-rw-r--r--sys/netinet/in_proto.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c
index 6d72fbe..110301a 100644
--- a/sys/netinet/in_proto.c
+++ b/sys/netinet/in_proto.c
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include "opt_ipsec.h"
#include "opt_inet6.h"
#include "opt_pf.h"
-#include "opt_carp.h"
#include "opt_sctp.h"
#include "opt_mpath.h"
@@ -94,10 +93,6 @@ static struct pr_usrreqs nousrreqs;
#include <net/if_pfsync.h>
#endif
-#ifdef DEV_CARP
-#include <netinet/ip_carp.h>
-#endif
-
extern struct domain inetdomain;
/* Spacer for loadable protocols. */
@@ -330,18 +325,6 @@ struct protosw inetsw[] = {
.pr_usrreqs = &rip_usrreqs
},
#endif /* DEV_PFSYNC */
-#ifdef DEV_CARP
-{
- .pr_type = SOCK_RAW,
- .pr_domain = &inetdomain,
- .pr_protocol = IPPROTO_CARP,
- .pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_input = carp_input,
- .pr_output = (pr_output_t*)rip_output,
- .pr_ctloutput = rip_ctloutput,
- .pr_usrreqs = &rip_usrreqs
-},
-#endif /* DEV_CARP */
/* Spacer n-times for loadable protocols. */
IPPROTOSPACER,
IPPROTOSPACER,
@@ -413,6 +396,3 @@ SYSCTL_NODE(_net_inet, IPPROTO_RAW, raw, CTLFLAG_RW, 0, "RAW");
#ifdef DEV_PFSYNC
SYSCTL_NODE(_net_inet, IPPROTO_PFSYNC, pfsync, CTLFLAG_RW, 0, "PFSYNC");
#endif
-#ifdef DEV_CARP
-SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP");
-#endif
OpenPOWER on IntegriCloud