From: James Chapman Date: Wed, 9 May 2012 23:43:09 +0000 (+0000) Subject: l2tp: fix data packet sequence number handling X-Git-Tag: upstream/snapshot3+hdmi~7403^2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d301e3256866bfd3ae3093aeb43d3ca9570d758e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: David S. Miller --- diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index d1ab3a2..0d6aedc 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -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);