Skip to content

Commit

Permalink
l2tp: fix data packet sequence number handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Chapman authored and David S. Miller committed May 11, 2012
1 parent 38d40b3 commit d301e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/l2tp/l2tp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunn

session->session_id = session_id;
session->peer_session_id = peer_session_id;
session->nr = 1;
session->nr = 0;

sprintf(&session->name[0], "sess %u/%u",
tunnel->tunnel_id, session->session_id);
Expand Down

0 comments on commit d301e32

Please sign in to comment.