I have the following settings. It fails if I set the mtu to anything larger than 1500. Has anyone been successful with?
let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "0.0.0.1")
let addresses: [String] = ["0.0.0.2"]
let subnetMasks: [String] = ["255.255.255.0"]
settings.ipv4Settings = NEIPv4Settings(addresses: addresses, subnetMasks: subnetMasks)
settings.mtu = Int(1500) as NSNumber
Thanks,
Dankira.
HI Eskimo,
Thank you for the response.
I am testing both on iOS 12.1.1 and 13.2.2:
On 12.1.1, it fails consistently with the following message:
NetworkExtension 380 error 11:46:11.257106 -0500 nesessionmanager SIOCGIFMTU failed: Device not configured
NetworkExtension 380 error 11:46:11.257216 -0500 nesessionmanager NEVirtualInterfaceAdjustReadBufferSize: interface_get_mtu failed (6), defaulting to max mtu
NetworkExtension 380 error 11:46:44.847684 -0500 nesessionmanager SIOCGIFMTU failed: Device not configured
NetworkExtension 380 error 11:46:44.847730 -0500 nesessionmanager NEVirtualInterfaceAdjustReadBufferSize: interface_get_mtu failed (6), defaulting to max mtu
NetworkExtension 380 error 11:55:31.579471 -0500 nesessionmanager SIOCGIFMTU failed: Device not configured
NetworkExtension 380 error 11:55:31.579514 -0500 nesessionmanager NEVirtualInterfaceAdjustReadBufferSize: interface_get_mtu failed (6), defaulting to max mtu
NetworkExtension 380 error 11:55:36.318867 -0500 nesessionmanager Failed to set MTU with NEHelper: Invalid argument
nehelper 18562 error 11:55:36.319392 -0500 nehelper Cannot set MTU, Invalid argument
nesessionmanager 380 error 11:55:36.319436 -0500 nesessionmanager NESMVPNSession[iboss cloud connector 2020:BF1772CF-BE07-4EE4-9789-2BD877083041]: failed to set the MTU to 16000
On 13.2.2, I see it failing most of the time but succeeds only rarely.
When it succeeds, I see the MSS being advertised as 1760 but I expect it to be close to 16000.
Thanks,
Dankira.