Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/npf/npftest/libnpftest npftest -- npf_test_init(): ...
details: https://anonhg.NetBSD.org/src/rev/d4d55d0429f9
branches: trunk
changeset: 933787:d4d55d0429f9
user: rmind <rmind%NetBSD.org@localhost>
date: Sat May 30 21:00:31 2020 +0000
description:
npftest -- npf_test_init(): add a workaround for NetBSD.
diffstat:
usr.sbin/npf/npftest/libnpftest/npf_test_subr.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r 2be44f9c14d8 -r d4d55d0429f9 usr.sbin/npf/npftest/libnpftest/npf_test_subr.c
--- a/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c Sat May 30 20:54:54 2020 +0000
+++ b/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c Sat May 30 21:00:31 2020 +0000
@@ -64,6 +64,13 @@
{
npf_t *npf;
+#ifdef __NetBSD__
+ // XXX: Workaround for npf_init()
+ if ((npf = npf_getkernctx()) != NULL) {
+ npf_worker_discharge(npf);
+ npf_worker_sysfini();
+ }
+#endif
npfk_sysinit(0);
npf = npfk_create(0, &npftest_mbufops, &npftest_ifops, NULL);
npfk_thread_register(npf);
Home |
Main Index |
Thread Index |
Old Index