I have been implementing a NEFilterPacketProvider
to be used as part of a system extension and running into a problem that I find highly bewildering.
The packet handler function just never gets called for one of my VMs while it gets called just fine in another VM. They both have the exact same MDM profile installed that pre-authorizes the activation of the sysx and network filters.
I have looked at every instance of this problem online and tried every single one of the tips I've read. I've made sure to set filterPacket = true
. I ensured that my NEFilterPacketProvider
is getting initialized and startFilter()
gets called. I ensured that I am calling the completionHandler in startFilter
. I ensured there are proper entitlements. I have tried implementations in both Swift and Objective-C. Nothing seems to make a difference.
The data provider gets called reliably and consistently.
Since this is working just fine in one of my VMs, I am quite confident the code is correct.
My question is this: what are some tips to systematically debug this issue? If you were me, where would you start looking at this?
Are there some command line tools that I can use to inspect the state of the network extension or macOS's state regarding them? scutil --nc list
doesn't show anything (I assume because NEFilterPacketProvider isn't a proxy). What are some other commands I can use to really poke at network extensions?
I've looked at Console logs for sysextd
and neagent
and nothing stands out as an explanation.
I would love to know why the packet handler isn't getting called!