As the new system extension framework is new and quite complicated I'm not sure if this is a BUG or an issue with its use.
Both in my custom system extension AND in the example network extension created by apple, the SimpleFirewall example. The local port of a new flow is always 0.
In the SimpleFirewall example this would be 'socketFlow.localEndpoint.port'
if you log this out, I always get 0.
Note the remote address and remote port seems correct.
Whats going on here ?