Hi,
We notice with our app which we ship with an NEPacketTunnelProvider Network Extension that iOS does not correctly track the device and apps’ data usage over cellular networks when the traffic is going through an NEPacketTunnelProvider. All data going through the NEPacketTunnelProvider to the VPN tunnel server is counted towards the total cellular usage of the originating app as well as that of the app containing the NEPacketTunnelProvider. This leads to the containing app seeming to be responsible for 50% of all data usage and it also inflates the displayed total cellular data usage to 200% of the actual usage.
It seems all data in packets read from and written to the NEPacketFlow as well as all data read from and written to the BSD sockets used to forward all traffic to the tunnel server are counted towards the containing app’s total cellular data usage.
Example:
Let’s say we reset our cellular usage tracking and use 500 MB with Safari, 2 GB with Youtube and maybe 100KB for the PacketTunnelApp. We expect to end up with the following usage summary:
- Safari: 500 MB
- Youtube: 2 GB
- PacketTunnelApp: 100 KB
Total cellular usage: ~2,5 GB (= 500 MB + 2 GB + 100 KB)
But the actual summary looks like this:
- Safari: 500 MB
- Youtube: 2 GB
- PacketTunnelApp: ~2,5 GB (= 50% of displayed total)
Total cellular usage: ~5 GB (= 200% of actual usage)
Note that the PacketTunnelApp’s cellular usage is equal to all the other apps combined.
Does anyone else also have this problem?