mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
wg: uma_zcreate() does not fail
No functional change intended. MFC after: 1 week
This commit is contained in:
parent
964064937e
commit
b6a0ed7c78
|
@ -3135,9 +3135,9 @@ wg_module_init(void)
|
||||||
[PR_METHOD_REMOVE] = wg_prison_remove,
|
[PR_METHOD_REMOVE] = wg_prison_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
|
wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
|
||||||
NULL, NULL, NULL, NULL, 0, 0)) == NULL)
|
NULL, NULL, NULL, NULL, 0, 0);
|
||||||
return (ENOMEM);
|
|
||||||
ret = crypto_init();
|
ret = crypto_init();
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
|
@ -85,9 +85,8 @@ static uma_zone_t ratelimit_zone;
|
||||||
int
|
int
|
||||||
cookie_init(void)
|
cookie_init(void)
|
||||||
{
|
{
|
||||||
if ((ratelimit_zone = uma_zcreate("wg ratelimit",
|
ratelimit_zone = uma_zcreate("wg ratelimit",
|
||||||
sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0)) == NULL)
|
sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0);
|
||||||
return ENOMEM;
|
|
||||||
|
|
||||||
ratelimit_init(&ratelimit_v4);
|
ratelimit_init(&ratelimit_v4);
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
|
|
Loading…
Reference in a new issue