Apologies for the significant (2 year) delay. I've now found a similar project that requires this functionality. I've raised a second pull-request (https://github.com/opnsense/core/pull/2823) that incorporates the comments from the first. Hope this meets with your approval.