MFp4 CH180235:

Add proto spacers to inet6sw like we have for legacy IP. This allows us
to dynamically pf_proto_register() for INET6 from modules, needed by
upcoming CARP changes and SeND.
MC and SCTP could make use of it as well in theory in the future after
upcoming VIMAGE vnet teardown work.

Discussed with:	will, anchie
MFC after:	10 days
This commit is contained in:
Bjoern A. Zeeb 2010-08-09 19:53:24 +00:00
parent b316507576
commit 4f7495d32a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211115

View File

@ -145,6 +145,14 @@ static struct pr_usrreqs nousrreqs;
#define PR_LISTEN 0
#define PR_ABRTACPTDIS 0
/* Spacer for loadable protocols. */
#define IP6PROTOSPACER \
{ \
.pr_domain = &inet6domain, \
.pr_protocol = PROTO_SPACER, \
.pr_usrreqs = &nousrreqs \
}
struct ip6protosw inet6sw[] = {
{
.pr_type = 0,
@ -340,6 +348,15 @@ struct ip6protosw inet6sw[] = {
.pr_usrreqs = &rip6_usrreqs
},
#endif /* DEV_CARP */
/* Spacer n-times for loadable protocols. */
IP6PROTOSPACER,
IP6PROTOSPACER,
IP6PROTOSPACER,
IP6PROTOSPACER,
IP6PROTOSPACER,
IP6PROTOSPACER,
IP6PROTOSPACER,
IP6PROTOSPACER,
/* raw wildcard */
{
.pr_type = SOCK_RAW,