diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2018-09-28 14:23:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-29 14:24:22 -0400 |
commit | 25b9221b959483f17c2964d0922869e16caa86b5 (patch) | |
tree | efe153ded226c9b0046ff7612fa90fb0883e93b2 /net/tipc/node.h | |
parent | 39fdc9c71f652cdf056ec3341581bde805444b57 (diff) |
tipc: add SYN bit to connection setup messages
Messages intended for intitating a connection are currently
indistinguishable from regular datagram messages. The TIPC
protocol specification defines bit 17 in word 0 as a SYN bit
to allow sanity check of such messages in the listening socket,
but this has so far never been implemented.
We do that in this commit.
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/node.h')
-rw-r--r-- | net/tipc/node.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index 48b3298a248d..03f5efb62cfb 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -45,6 +45,7 @@ | |||
45 | /* Optional capabilities supported by this code version | 45 | /* Optional capabilities supported by this code version |
46 | */ | 46 | */ |
47 | enum { | 47 | enum { |
48 | TIPC_SYN_BIT = (1), | ||
48 | TIPC_BCAST_SYNCH = (1 << 1), | 49 | TIPC_BCAST_SYNCH = (1 << 1), |
49 | TIPC_BCAST_STATE_NACK = (1 << 2), | 50 | TIPC_BCAST_STATE_NACK = (1 << 2), |
50 | TIPC_BLOCK_FLOWCTL = (1 << 3), | 51 | TIPC_BLOCK_FLOWCTL = (1 << 3), |
@@ -53,11 +54,12 @@ enum { | |||
53 | TIPC_LINK_PROTO_SEQNO = (1 << 6) | 54 | TIPC_LINK_PROTO_SEQNO = (1 << 6) |
54 | }; | 55 | }; |
55 | 56 | ||
56 | #define TIPC_NODE_CAPABILITIES (TIPC_BCAST_SYNCH | \ | 57 | #define TIPC_NODE_CAPABILITIES (TIPC_SYN_BIT | \ |
57 | TIPC_BCAST_STATE_NACK | \ | 58 | TIPC_BCAST_SYNCH | \ |
58 | TIPC_BCAST_RCAST | \ | 59 | TIPC_BCAST_STATE_NACK | \ |
59 | TIPC_BLOCK_FLOWCTL | \ | 60 | TIPC_BCAST_RCAST | \ |
60 | TIPC_NODE_ID128 | \ | 61 | TIPC_BLOCK_FLOWCTL | \ |
62 | TIPC_NODE_ID128 | \ | ||
61 | TIPC_LINK_PROTO_SEQNO) | 63 | TIPC_LINK_PROTO_SEQNO) |
62 | #define INVALID_BEARER_ID -1 | 64 | #define INVALID_BEARER_ID -1 |
63 | 65 | ||