wlanslovenija / tunneldigger

L2TPv3 VPN tunneling solution

Home Page:http://tunneldigger.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newer Kernels log error "recv short packet" for every broker packet

kaechele opened this issue · comments

This is due to the fact that the control packets we use to communicate with the broker are shorter than 14 bytes (the maximum header size of an L2TP packet).
Recently (I upgraded from 5.9.16 to 5.10.11, haven't had time to pinpoint exactly) the kernel throws a warning in dmesg when a short packet is received leading to lots of spam in dmesg: https://github.com/torvalds/linux/blob/master/net/l2tp/l2tp_core.c#L811 and torvalds/linux@5ee759c

Functionality is not impacted because the error case for this scenario is to forward the packet to user space where the broker is able to pick it up and process it as usual.
The only thing that changed is that the warning is now visible in dmesg.

My first idea for a fix would be to pad our control packets to 14 bytes. Thoughts?

Sample error:

[  630.674133] l2tp_udp_recv_core: 20 callbacks suppressed
[  630.683240] l2tp_core: tunl 100: recv short packet (len=12)

My first idea for a fix would be to pad our control packets to 14 bytes. Thoughts?

Yeah, that sounds like the most pragmatic solution. However, if we do this client change, will this be compatible with old brokers (and vice versa)?

@NeoRaider that's great, thanks. :)

The patch has been backported to Linux 5.10.24 and 5.11.7.

Confirmed fixed on Fedora 33 with 5.11.7.

commented

What is the status of this?

It's fixed upstream in the kernel.