Skip to content

Error "read UDPv4 [CMSG=8|EMSGSIZE Path-MTU=1492]: Message too large" only with packet sizes of 1441 to 1448 #823

@Kurgan-

Description

@Kurgan-

I have found that inside of an Openvpn tunnel if I send ICMP packets ranging in size from 1441 to 1448 bytes, they fail to go through the vpn. Any other size works. When packets get lost, I have an error that says "read UDPv4 [CMSG=8|EMSGSIZE Path-MTU=1492]: Message too large (fd=7,code=90)"

My setup is as follows:

Openvpn 2.6.14 on Openwrt, set up as a server. The config is very simple and there are no settings regarding tunnel MTU, link MTU, etc. Proto is UDP.

The external link is PPPOE so the MTU of the link is 1492 (tested it with ping -M do -s 1492 <external remote ip>). Please note that PPPOE is not terminated on the Openvpn server so its egress interface MTU is 1500, only the PATH MTU is 1492.

Openvpn 2.6.12 on Linux, on the client side. The config is basically the same as the server, no settings regarding MTU.

In both logs (server and client ) the only information I see about MTU settings are there:

Control Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1250 tun_max_mtu:0 headroom:126 payload:1600 tailroom:126 ET:0 ]
Data Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]

And then after the connection is established, I see this new information in the log:

Data Channel MTU parms [ mss_fix:1400 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]

Once the VPN is connected, if I ping INSIDE of the VPN, I see this behavior:

ping -s 1412 192.168.4.10 - WORKS

ping -s 1413 192.168.4.10 - FAILS, no answer. (I get the message in the log ONLY ON SERVER SIDE)

ping -s 1414 and up to 1420, FAILS, as before.

ping -s 1421 192.168.4.10 - WORKS

every other size over 1421 works, too.

Please note that the actual size of the packet generated by these ping commands is bigger than the "-s" size I stated. The failing packet sizes are 1441 to 1448.

I have no idea why this happens. I have tried with Openvpn 2.5 and the issue is the same.

Please note that the error in the log appears only server-side and that the server is OpenWrt (on a AMD64 cpu).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions