mtu of TUN is not set correctly on OS X
OS X client is using kernel-libipsec and tun device, but the TUN created by OS X client has a MTU of 1500, which is causing problems as websites like apple.com/speedtest.net has some problem with PMTU.
#define TUN_DEFAULT_MTU 1400
The default MTU should be 1400, but ifconfig clearly says
utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500 inet 10.22.0.1 --> 10.22.0.1 netmask 0xff000000
I suppose this is a bug in tun device implementation.
kernel-pfroute: Set lower MTU on TUN devices
The default MTU of 1500 is too high if kernel-libipsec is used (considering
the overhead of UDP-encapsulated ESP), but might also have an effect if
a TUN device is only used to install a virtual IP (the route points to it,
so the system might use its MTU and 1500 would still be too high).
This also works around an issue on macOS 12 where no RTM_IFINFO event
is sent for the newly created TUN device (neither for the creation,
setting it "up", nor adding the address). Changing the MTU, however,
triggers such an event and we can detect the virtual IP.