Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

l2tp: fix data packet sequence number handling

If enabled, L2TP data packets have sequence numbers which a receiver
can use to drop out of sequence frames or try to reorder them. The
first frame has sequence number 0, but the L2TP code currently expects
it to be 1. This results in the first data frame being handled as out
of sequence.

This one-line patch fixes the problem.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

James Chapman and committed by
David S. Miller
d301e325 38d40b3f

+1 -1
+1 -1
net/l2tp/l2tp_core.c
··· 1762 1762 1763 1763 session->session_id = session_id; 1764 1764 session->peer_session_id = peer_session_id; 1765 - session->nr = 1; 1765 + session->nr = 0; 1766 1766 1767 1767 sprintf(&session->name[0], "sess %u/%u", 1768 1768 tunnel->tunnel_id, session->session_id);