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>
This commit is contained in:

committed by
David S. Miller

parent
23fd3eace0
commit
d50ccc2d39
@@ -442,6 +442,7 @@ bool tipc_link_create(struct net *net, char *if_name, int bearer_id,
|
||||
struct sk_buff_head *namedq,
|
||||
struct tipc_link **link)
|
||||
{
|
||||
char *self_str = tipc_own_id_string(net);
|
||||
struct tipc_link *l;
|
||||
|
||||
l = kzalloc(sizeof(*l), GFP_ATOMIC);
|
||||
@@ -451,7 +452,10 @@ bool tipc_link_create(struct net *net, char *if_name, int bearer_id,
|
||||
l->session = session;
|
||||
|
||||
/* Note: peer i/f name is completed by reset/activate message */
|
||||
sprintf(l->name, "%x:%s-%x:unknown", self, if_name, peer);
|
||||
if (strlen(self_str) > 16)
|
||||
sprintf(l->name, "%x:%s-%x:unknown", self, if_name, peer);
|
||||
else
|
||||
sprintf(l->name, "%s:%s-%x:unknown", self_str, if_name, peer);
|
||||
strcpy(l->if_name, if_name);
|
||||
l->addr = peer;
|
||||
l->peer_caps = peer_caps;
|
||||
|
Reference in New Issue
Block a user