Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/ip_carp.c
Show First 20 Lines • Show All 2,174 Lines • ▼ Show 20 Lines | static struct protosw in6_carp_protosw = { | ||||
.pr_flags = PR_ATOMIC|PR_ADDR, | .pr_flags = PR_ATOMIC|PR_ADDR, | ||||
.pr_input = carp6_input, | .pr_input = carp6_input, | ||||
.pr_output = rip6_output, | .pr_output = rip6_output, | ||||
.pr_ctloutput = rip6_ctloutput, | .pr_ctloutput = rip6_ctloutput, | ||||
.pr_usrreqs = &rip6_usrreqs | .pr_usrreqs = &rip6_usrreqs | ||||
}; | }; | ||||
#endif | #endif | ||||
#ifdef VIMAGE | |||||
#if defined(__i386__) | |||||
/* | |||||
* XXX This is a hack to work around an absolute relocation outside | |||||
* set_vnet by one (on the stop symbol) for carpstats. Add a dummy variable | |||||
* to the end of the file in the hope that the linker will just keep the | |||||
* order (as it seems to do at the moment). It is understood to be fragile. | |||||
* See PR 230857 for a longer discussion of the problem and the referenced | |||||
* review for possible alternate solutions. Each is a hack; we just need | |||||
* the least intrusive one for the next release. | |||||
*/ | |||||
VNET_DEFINE(char, carp_zzz) = 0xde; | |||||
#endif | |||||
#endif | |||||
static void | static void | ||||
carp_mod_cleanup(void) | carp_mod_cleanup(void) | ||||
{ | { | ||||
#ifdef INET | #ifdef INET | ||||
if (proto_reg[CARP_INET] == 0) { | if (proto_reg[CARP_INET] == 0) { | ||||
(void)ipproto_unregister(IPPROTO_CARP); | (void)ipproto_unregister(IPPROTO_CARP); | ||||
pf_proto_unregister(PF_INET, IPPROTO_CARP, SOCK_RAW); | pf_proto_unregister(PF_INET, IPPROTO_CARP, SOCK_RAW); | ||||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |