From 4f7495d32a3ce00ff63e437a995de5acb3f20384 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Mon, 9 Aug 2010 19:53:24 +0000 Subject: [PATCH] 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 --- sys/netinet6/in6_proto.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index b27893c5f9a..4aec9ccbd17 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -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, -- 2.45.2