diff options
author | James Chapman <jchapman@katalix.com> | 2012-05-09 23:43:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-10 23:27:34 -0400 |
commit | d301e3256866bfd3ae3093aeb43d3ca9570d758e (patch) | |
tree | 7395dbcfcefa7bbd1fc4ad68d8beed12190819be | |
parent | 38d40b3f4e223336422b7e87cb483e758ef87e3a (diff) | |
download | linux-d301e3256866bfd3ae3093aeb43d3ca9570d758e.tar.gz linux-d301e3256866bfd3ae3093aeb43d3ca9570d758e.tar.bz2 linux-d301e3256866bfd3ae3093aeb43d3ca9570d758e.zip |
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>
-rw-r--r-- | net/l2tp/l2tp_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index d1ab3a236cca..0d6aedc3a0ce 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); |