]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: make datapath sequence number support RFC-compliant
authorJames Chapman <jchapman@katalix.com>
Tue, 2 Jul 2013 19:28:59 +0000 (20:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2013 23:33:24 +0000 (16:33 -0700)
commitcb99e723a53a97422f8646fe0725a008f79f347c
treed4bc90f912c4f54a3becf34c2d8a7f35d2c605c6
parent99086e1f3032d621b044d2b38cf9a41adf757a07
l2tp: make datapath sequence number support RFC-compliant

The L2TP datapath is not currently RFC-compliant when sequence numbers
are used in L2TP data packets. According to the L2TP RFC, any received
sequence number NR greater than or equal to the next expected NR is
acceptable, where the "greater than or equal to" test is determined by
the NR wrap point. This differs for L2TPv2 and L2TPv3, so add state in
the session context to hold the max NR value and the NR window size in
order to do the acceptable sequence number value check. These might be
configurable later, but for now we derive it from the tunnel L2TP
version, which determines the sequence number field size.

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