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/d91f2be10f0f
branches:  trunk
changeset: 1010624:d91f2be10f0f
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 d2975d28b51c -r d91f2be10f0f 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