1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
10 #include "ratelimiter.h"
13 #include <uapi/linux/wireguard.h>
15 #include <linux/init.h>
16 #include <linux/module.h>
17 #include <linux/genetlink.h>
18 #include <net/rtnetlink.h>
20 static int __init
mod_init(void)
25 if (!wg_allowedips_selftest() || !wg_packet_counter_selftest() ||
26 !wg_ratelimiter_selftest())
27 return -ENOTRECOVERABLE
;
31 ret
= wg_device_init();
35 ret
= wg_genetlink_init();
39 pr_info("WireGuard " WIREGUARD_VERSION
" loaded. See www.wireguard.com for information.\n");
40 pr_info("Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.\n");
50 static void __exit
mod_exit(void)
52 wg_genetlink_uninit();
56 module_init(mod_init
);
57 module_exit(mod_exit
);
58 MODULE_LICENSE("GPL v2");
59 MODULE_DESCRIPTION("WireGuard secure network tunnel");
60 MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");
61 MODULE_VERSION(WIREGUARD_VERSION
);
62 MODULE_ALIAS_RTNL_LINK(KBUILD_MODNAME
);
63 MODULE_ALIAS_GENL_FAMILY(WG_GENL_NAME
);