diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-09-04 08:43:40 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-09-04 08:43:40 +0000 |
commit | 9afff0521bd3161bdbce6695ee2c75154d7858d1 (patch) | |
tree | cdb4de2031848165d23d257d661869003247ecc6 /sys/net/pfkey.c | |
parent | 3329517806969b15b0dbe4ca265bbe649c3aef4a (diff) |
Make every subsystem using a radix tree call rn_init() and pass the
length of the key as argument.
This way every consumer of the radix tree has a chance to explicitly
initialize the shared data structures and no longer rely on another
subsystem to do the initialization.
As a bonus ``dom_maxrtkey'' is no longer used an die.
ART kernels should now be fully usable because pf(4) and IPSEC properly
initialized the radix tree.
ok chris@, reyk@
Diffstat (limited to 'sys/net/pfkey.c')
-rw-r--r-- | sys/net/pfkey.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/pfkey.c b/sys/net/pfkey.c index ac1f4dbc40b..7428983e595 100644 --- a/sys/net/pfkey.c +++ b/sys/net/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.26 2015/08/30 10:39:16 mpi Exp $ */ +/* $OpenBSD: pfkey.c,v 1.27 2015/09/04 08:43:39 mpi Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -270,8 +270,7 @@ struct domain pfkeydomain = { NULL, /* protosw */ NULL, /* protoswNPROTOSW */ NULL, /* dom_rtattach */ - 16, /* rtoffset */ - sizeof(struct sockaddr_encap) /* maxrtkey */ + 16 /* rtoffset */ }; static struct protosw pfkey_protosw_template = { @@ -341,6 +340,8 @@ pfkey_buildprotosw(void) void pfkey_init(void) { + rn_init(sizeof(struct sockaddr_encap)); + if (pfkey_buildprotosw() != 0) return; |