From: Allan Stephens Date: Tue, 17 Apr 2012 22:16:34 +0000 (-0400) Subject: tipc: Ensure network address change doesn't impact name table updates X-Git-Tag: firefly_0821_release~3680^2~2787^2~370^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4f5c12cdf43ce70731d5abfb6400bfb1be392d3;p=firefly-linux-kernel-4.4.55.git tipc: Ensure network address change doesn't impact name table updates Revises routines that add and remove an entry from a node's name table so that the publication scope lists are updated properly even if the node's network address is changed in mid-operation. The routines now recognize the default node address of <0.0.0> as an alias for "this node" even after a new network address has been assigned. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 1e0518da19da..25c2975d86ee 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -342,12 +342,12 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, list_add(&publ->zone_list, &info->zone_list); info->zone_list_size++; - if (in_own_cluster_exact(node)) { + if (in_own_cluster(node)) { list_add(&publ->cluster_list, &info->cluster_list); info->cluster_list_size++; } - if (node == tipc_own_addr) { + if (in_own_node(node)) { list_add(&publ->node_list, &info->node_list); info->node_list_size++; } @@ -411,14 +411,14 @@ found: /* Remove publication from cluster scope list, if present */ - if (in_own_cluster_exact(node)) { + if (in_own_cluster(node)) { list_del(&publ->cluster_list); info->cluster_list_size--; } /* Remove publication from node scope list, if present */ - if (node == tipc_own_addr) { + if (in_own_node(node)) { list_del(&publ->node_list); info->node_list_size--; }