Jumbo packet are not accepted by utun interface

OS: MacOS 14.3 (23D56)

I have PacketTunnelProvider VPN running with MTU on utun interface as 1300.

% ifconfig utun4
utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1300
	options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
	inet 192.166.54.1 --> 192.166.54.1 netmask 0xffffff00
	nd6 options=201<PERFORMNUD,DAD>

When I am sending Jumbo size packets using ICMP and it is working fine till 4068 bytes packet size, after that ICMP responses are not accepted by the utun interface.

Working till 4068 packets:

% ping 13.71.68.85 -s 4068
PING 13.71.68.85 (13.71.68.85): 4068 data bytes
4076 bytes from 13.71.68.85: icmp_seq=0 ttl=56 time=46.040 ms
4076 bytes from 13.71.68.85: icmp_seq=1 ttl=56 time=25.353 ms

Not Working after sending 4069 packets:

% ping 13.71.68.85 -s 4069
PING 13.71.68.85 (13.71.68.85): 4069 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1

In System logs I could see below errors:

% log stream  | grep utun4
2024-06-19 17:22:34.666286+0530 0x7ee9e2   Error       0x0                  0      0    kernel: utun_netif_sync_rx utun4: legacy packet length 4097 > 4096
2024-06-19 17:22:35.637723+0530 0x7ee9e2   Error       0x0                  0      0    kernel: utun_netif_sync_rx utun4: legacy packet length 4097 > 4096

Note: Same works fine on en0 interface when packet is not routed via utun interface. Working till 8184 packets on en0 interface:

% ping 13.71.68.85 -s 8184
PING 13.71.68.85 (13.71.68.85): 8184 data bytes
8192 bytes from 13.71.68.85: icmp_seq=0 ttl=51 time=198.928 ms
8192 bytes from 13.71.68.85: icmp_seq=1 ttl=51 time=46.139 ms

% ping 13.71.68.85 -s 8185
PING 13.71.68.85 (13.71.68.85): 8185 data bytes
ping: sendto: Message too long
ping: sendto: Message too long

Does this mean, on utun interface we do not support packet inception of more than 4096 size?

Answered by Systems Engineer in 792011022

Does this mean, on utun interface we do not support packet inception of more than 4096 size?

It looks like this could just be the default path. Checkout the code in the open source repo here: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/net/if_utun.c#L696

Matt Eaton - Networking

Accepted Answer

Does this mean, on utun interface we do not support packet inception of more than 4096 size?

It looks like this could just be the default path. Checkout the code in the open source repo here: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/net/if_utun.c#L696

Matt Eaton - Networking

Jumbo packet are not accepted by utun interface
 
 
Q