mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-20 18:02:58 +07:00
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 <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:
parent
336ebf5bf5
commit
d4f5c12cdf
@ -342,12 +342,12 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq,
|
|||||||
list_add(&publ->zone_list, &info->zone_list);
|
list_add(&publ->zone_list, &info->zone_list);
|
||||||
info->zone_list_size++;
|
info->zone_list_size++;
|
||||||
|
|
||||||
if (in_own_cluster_exact(node)) {
|
if (in_own_cluster(node)) {
|
||||||
list_add(&publ->cluster_list, &info->cluster_list);
|
list_add(&publ->cluster_list, &info->cluster_list);
|
||||||
info->cluster_list_size++;
|
info->cluster_list_size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node == tipc_own_addr) {
|
if (in_own_node(node)) {
|
||||||
list_add(&publ->node_list, &info->node_list);
|
list_add(&publ->node_list, &info->node_list);
|
||||||
info->node_list_size++;
|
info->node_list_size++;
|
||||||
}
|
}
|
||||||
@ -411,14 +411,14 @@ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 i
|
|||||||
|
|
||||||
/* Remove publication from cluster scope list, if present */
|
/* Remove publication from cluster scope list, if present */
|
||||||
|
|
||||||
if (in_own_cluster_exact(node)) {
|
if (in_own_cluster(node)) {
|
||||||
list_del(&publ->cluster_list);
|
list_del(&publ->cluster_list);
|
||||||
info->cluster_list_size--;
|
info->cluster_list_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove publication from node scope list, if present */
|
/* Remove publication from node scope list, if present */
|
||||||
|
|
||||||
if (node == tipc_own_addr) {
|
if (in_own_node(node)) {
|
||||||
list_del(&publ->node_list);
|
list_del(&publ->node_list);
|
||||||
info->node_list_size--;
|
info->node_list_size--;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user