summaryrefslogtreecommitdiff
path: root/net/tipc/link.h
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2018-07-10 02:07:36 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-12 09:06:14 +0300
commit7ea817f4e8322fa27fb860d15025bf72f68b179f (patch)
tree906e6081a486ba6f244a8c0bb6d7c51c6343423d /net/tipc/link.h
parent9012de5089560136b849b920ad038b96160ed8f6 (diff)
downloadlinux-7ea817f4e8322fa27fb860d15025bf72f68b179f.tar.xz
tipc: check session number before accepting link protocol messages
In some virtual environments we observe a significant higher number of packet reordering and delays than we have been used to traditionally. This makes it necessary with stricter checks on incoming link protocol messages' session number, which until now only has been validated for RESET messages. Since the other two message types, ACTIVATE and STATE messages also carry this number, it is easy to extend the validation check to those messages. We also introduce a flag indicating if a link has a valid peer session number or not. This eliminates the mixing of 32- and 16-bit arithmethics we are currently using to achieve this. Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r--net/tipc/link.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h
index d56f9c9e5000..7bc494a33fdf 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -111,6 +111,7 @@ char tipc_link_plane(struct tipc_link *l);
int tipc_link_prio(struct tipc_link *l);
int tipc_link_window(struct tipc_link *l);
void tipc_link_update_caps(struct tipc_link *l, u16 capabilities);
+bool tipc_link_validate_msg(struct tipc_link *l, struct tipc_msg *hdr);
unsigned long tipc_link_tolerance(struct tipc_link *l);
void tipc_link_set_tolerance(struct tipc_link *l, u32 tol,
struct sk_buff_head *xmitq);