git: d89e1db5a331 - main - if_wg: fix modules load on !x86
Mitchell Horne
mhorne at FreeBSD.org
Tue Jan 12 22:07:24 UTC 2021
The branch main has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=d89e1db5a3319f4e3bc9403ed883c64638b67f71
commit d89e1db5a3319f4e3bc9403ed883c64638b67f71
Author: Mitchell Horne <mhorne at FreeBSD.org>
AuthorDate: 2021-01-12 21:38:21 +0000
Commit: Mitchell Horne <mhorne at FreeBSD.org>
CommitDate: 2021-01-12 22:07:10 +0000
if_wg: fix modules load on !x86
Only x86 provides optimized implementations via the blake2 module. The
software "reference" implementation is already included in the crypto(4)
module, we can drop the extra MODULE_DEPEND for other platforms.
Without this change, if_wg.ko could not be loaded due to the missing
dependency.
PR: 252156
Reported by: gbe
Sponsored by: The FreeBSD Foundation
---
sys/dev/if_wg/module/module.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/dev/if_wg/module/module.c b/sys/dev/if_wg/module/module.c
index c7c71a1a0f72..76c7db01cba1 100644
--- a/sys/dev/if_wg/module/module.c
+++ b/sys/dev/if_wg/module/module.c
@@ -843,5 +843,8 @@ static moduledata_t wg_moduledata = {
DECLARE_MODULE(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY);
MODULE_VERSION(wg, 1);
MODULE_DEPEND(wg, iflib, 1, 1, 1);
+#if defined(__amd64__) || defined(__i386__)
+/* Optimized blake2 implementations are only available on x86. */
MODULE_DEPEND(wg, blake2, 1, 1, 1);
+#endif
MODULE_DEPEND(wg, crypto, 1, 1, 1);
More information about the dev-commits-src-main
mailing list