The driver stays loaded once a tunnel has been given its transform, XGS 136, 2026-11-28
On the lab XGS 136 on 2026-11-28 at 07:54 UTC, a reload of npuep.ko from 0.1.0-alpha.15.2 to 0.2.0-alpha.1.1
stopped the host with a general protection fault in ipsec4_perform_request
(issue 1230). An outbound IPsec association still
named the unloaded module's copy of the kernel's ESP transform, and the next build's read-only data sat at its
address. strongSwan's log on the box shows a MOBIKE address update between the reload before and that one: an
address update is what makes the kernel clone an association, transform pointer and all, without offering the
clone to a driver. The dump kept has not been read, so which association it was is still not known.
Since the same day npuep refuses kldunload once an outbound association has been given its transform, as octep
has since #830. reload.sh and the coprocessor's
recovery in place (recover.sh) ask before they take anything down. What was measured, on the box that
panicked: vendor version 21, OPNsense 26.7, kernel FreeBSD 15.1-RELEASE-p6, npuep built on the appliance from
the branch against its own kernel's sources, every warning fatal, none given.
Measured
| a reload with nothing interposed, from the release's module and from itself | reload.sh exit 0 each time, 14 front ports back; again after the build changed |
| the tunnel to the second XGS 3300 brought up through a front port | both associations taken by the engine, dev.npuep.0.ipsec.interposed 1 |
contrib/npuep/test-unload-refusal.sh then |
14 of 14 checks passed: kldunload refused by the kernel (Device busy), its line in the kernel's log, reload.sh refused before anything, the same module at the same address, 14 front ports and 5 links as before, the coprocessor not reset |
| the same after a rekey of the child and a reauthentication of the IKE association (the first build of the day) | every check passed; 3 encrypting associations taken, 2 let go |
kldunload -f with an association interposed, both builds |
the kernel detached the devices first, as FreeBSD's MOD_UNLOAD does, then the module refused and stayed loaded at the same address, two associations still in the kernel; ten minutes with no panic, and none after the restart: the only dump on the box is the morning's |
the new reload.sh against the release's module (0.2.0-alpha.1.2) with a tunnel up |
that module has no ipsec.interposed; its ipsec.accepted_encrypt read 1, and reload.sh refused before anything, exit 1, the module as it was: the case of an owner who has taken the update and not yet restarted |
the release's own reload.sh against the new module |
it went on to its unload, the kernel answered Device busy, and it stopped there with the coprocessor not reset |



The window between the unload's question and the devices' detach is closed in the code and not measured: the answer is taken under the lock the interposition takes, and when it is no, nothing is interposed after it.
What it does not mean
- Not tried on vendor versions 22 or 23, or on an XGS 136 in service: one lab box, one tunnel.
- The cost is a restart: once a tunnel has been given the transform, a new build of the driver loads only at the next boot, and the coprocessor's recovery in place restarts the appliance instead of taking it up again.
- The XGS 3300's driver did not change; its refusal was measured with #830.
The discussion of this page is held in the project's GitHub Discussions. Showing it here loads giscus from giscus.app and GitHub, and writing in it needs a GitHub account - what that means.