diff options
author | James Chapman <jchapman@katalix.com> | 2013-07-02 23:28:59 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-03 03:33:24 +0400 |
commit | 8a1631d588a39e826f4248e60310498d5266c6fa (patch) | |
tree | d4bc90f912c4f54a3becf34c2d8a7f35d2c605c6 /net/l2tp/l2tp_core.h | |
parent | b6dc01a43aaca24e6e6928e24d9b37ba599f1e3c (diff) | |
download | linux-8a1631d588a39e826f4248e60310498d5266c6fa.tar.xz |
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>
Diffstat (limited to 'net/l2tp/l2tp_core.h')
-rw-r--r-- | net/l2tp/l2tp_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h index 485a490fd990..4b9a3b724423 100644 --- a/net/l2tp/l2tp_core.h +++ b/net/l2tp/l2tp_core.h @@ -102,6 +102,8 @@ struct l2tp_session { u32 nr; /* session NR state (receive) */ u32 ns; /* session NR state (send) */ struct sk_buff_head reorder_q; /* receive reorder queue */ + u32 nr_max; /* max NR. Depends on tunnel */ + u32 nr_window_size; /* NR window size */ struct hlist_node hlist; /* Hash list node */ atomic_t ref_count; |