diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2018-03-22 15:42:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-23 13:12:18 -0400 |
commit | d50ccc2d3909fc1b4d40e4af16b026f05dc68707 (patch) | |
tree | 09ef046f87dc8eb6d4611b26a355477293a01bbd /net/tipc/core.c | |
parent | 23fd3eace088ab1872ee59c19191a119ec779ac9 (diff) |
tipc: add 128-bit node identifier
We add a 128-bit node identity, as an alternative to the currently used
32-bit node address.
For the sake of compatibility and to minimize message header changes
we retain the existing 32-bit address field. When not set explicitly by
the user, this field will be filled with a hash value generated from the
much longer node identity, and be used as a shorthand value for the
latter.
We permit either the address or the identity to be set by configuration,
but not both, so when the address value is set by a legacy user the
corresponding 128-bit node identity is generated based on the that value.
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/core.c')
-rw-r--r-- | net/tipc/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index 04fd91bb11d7..e92fed49e095 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -56,7 +56,9 @@ static int __net_init tipc_init_net(struct net *net) | |||
56 | int err; | 56 | int err; |
57 | 57 | ||
58 | tn->net_id = 4711; | 58 | tn->net_id = 4711; |
59 | tn->own_addr = 0; | 59 | tn->node_addr = 0; |
60 | memset(tn->node_id, 0, sizeof(tn->node_id)); | ||
61 | memset(tn->node_id_string, 0, sizeof(tn->node_id_string)); | ||
60 | tn->mon_threshold = TIPC_DEF_MON_THRESHOLD; | 62 | tn->mon_threshold = TIPC_DEF_MON_THRESHOLD; |
61 | get_random_bytes(&tn->random, sizeof(int)); | 63 | get_random_bytes(&tn->random, sizeof(int)); |
62 | INIT_LIST_HEAD(&tn->node_list); | 64 | INIT_LIST_HEAD(&tn->node_list); |