blob: 8465263246c3211c996fa8ed8c1e5e6d5f1c76ed [file] [log] [blame]
Per Lidenb97bf3f2006-01-02 19:04:38 +01001/*
2 * net/tipc/name_distr.c: TIPC name distribution code
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +09003 *
Per Liden593a5f22006-01-11 19:14:19 +01004 * Copyright (c) 2000-2006, Ericsson AB
Allan Stephens431697e2011-02-23 13:51:15 -05005 * Copyright (c) 2005, 2010-2011, Wind River Systems
Per Lidenb97bf3f2006-01-02 19:04:38 +01006 * All rights reserved.
7 *
Per Liden9ea1fd32006-01-11 13:30:43 +01008 * Redistribution and use in source and binary forms, with or without
Per Lidenb97bf3f2006-01-02 19:04:38 +01009 * modification, are permitted provided that the following conditions are met:
10 *
Per Liden9ea1fd32006-01-11 13:30:43 +010011 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the names of the copyright holders nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
Per Lidenb97bf3f2006-01-02 19:04:38 +010019 *
Per Liden9ea1fd32006-01-11 13:30:43 +010020 * Alternatively, this software may be distributed under the terms of the
21 * GNU General Public License ("GPL") version 2 as published by the Free
22 * Software Foundation.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Per Lidenb97bf3f2006-01-02 19:04:38 +010034 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37#include "core.h"
Per Lidenb97bf3f2006-01-02 19:04:38 +010038#include "link.h"
Per Lidenb97bf3f2006-01-02 19:04:38 +010039#include "name_distr.h"
40
Per Lidenb97bf3f2006-01-02 19:04:38 +010041#define ITEM_SIZE sizeof(struct distr_item)
42
43/**
44 * struct distr_item - publication info distributed to other nodes
45 * @type: name sequence type
46 * @lower: name sequence lower bound
47 * @upper: name sequence upper bound
48 * @ref: publishing port reference
49 * @key: publication key
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +090050 *
Per Lidenb97bf3f2006-01-02 19:04:38 +010051 * ===> All fields are stored in network byte order. <===
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +090052 *
Per Lidenb97bf3f2006-01-02 19:04:38 +010053 * First 3 fields identify (name or) name sequence being published.
54 * Reference field uniquely identifies port that published name sequence.
55 * Key field uniquely identifies publication, in the event a port has
56 * multiple publications of the same name sequence.
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +090057 *
58 * Note: There is no field that identifies the publishing node because it is
Per Lidenb97bf3f2006-01-02 19:04:38 +010059 * the same for all items contained within a publication message.
60 */
Per Lidenb97bf3f2006-01-02 19:04:38 +010061struct distr_item {
Al Viro3e6c8cd2006-11-08 00:19:09 -080062 __be32 type;
63 __be32 lower;
64 __be32 upper;
65 __be32 ref;
66 __be32 key;
Per Lidenb97bf3f2006-01-02 19:04:38 +010067};
68
69/**
Allan Stephens3f8375f2012-04-17 17:57:52 -040070 * struct publ_list - list of publications made by this node
71 * @list: circular list of publications
72 * @list_size: number of entries in list
Per Lidenb97bf3f2006-01-02 19:04:38 +010073 */
Allan Stephens3f8375f2012-04-17 17:57:52 -040074struct publ_list {
75 struct list_head list;
76 u32 size;
77};
Per Lidenb97bf3f2006-01-02 19:04:38 +010078
Allan Stephensa9098042012-04-17 17:57:52 -040079static struct publ_list publ_zone = {
80 .list = LIST_HEAD_INIT(publ_zone.list),
81 .size = 0,
82};
83
Allan Stephens3f8375f2012-04-17 17:57:52 -040084static struct publ_list publ_cluster = {
85 .list = LIST_HEAD_INIT(publ_cluster.list),
86 .size = 0,
87};
Per Lidenb97bf3f2006-01-02 19:04:38 +010088
Allan Stephensa9098042012-04-17 17:57:52 -040089static struct publ_list publ_node = {
90 .list = LIST_HEAD_INIT(publ_node.list),
91 .size = 0,
92};
93
94static struct publ_list *publ_lists[] = {
95 NULL,
96 &publ_zone, /* publ_lists[TIPC_ZONE_SCOPE] */
97 &publ_cluster, /* publ_lists[TIPC_CLUSTER_SCOPE] */
98 &publ_node /* publ_lists[TIPC_NODE_SCOPE] */
99};
100
101
Per Lidenb97bf3f2006-01-02 19:04:38 +0100102/**
103 * publ_to_item - add publication info to a publication message
104 */
Per Lidenb97bf3f2006-01-02 19:04:38 +0100105static void publ_to_item(struct distr_item *i, struct publication *p)
106{
107 i->type = htonl(p->type);
108 i->lower = htonl(p->lower);
109 i->upper = htonl(p->upper);
110 i->ref = htonl(p->ref);
111 i->key = htonl(p->key);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100112}
113
114/**
115 * named_prepare_buf - allocate & initialize a publication message
116 */
Per Lidenb97bf3f2006-01-02 19:04:38 +0100117static struct sk_buff *named_prepare_buf(u32 type, u32 size, u32 dest)
118{
Allan Stephens741d9eb2011-05-31 15:03:18 -0400119 struct sk_buff *buf = tipc_buf_acquire(INT_H_SIZE + size);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100120 struct tipc_msg *msg;
121
122 if (buf != NULL) {
123 msg = buf_msg(buf);
Allan Stephens741d9eb2011-05-31 15:03:18 -0400124 tipc_msg_init(msg, NAME_DISTRIBUTOR, type, INT_H_SIZE, dest);
125 msg_set_size(msg, INT_H_SIZE + size);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100126 }
127 return buf;
128}
129
Ying Xueeab8c0452014-04-28 18:00:10 +0800130void named_cluster_distribute(struct sk_buff *buf)
Allan Stephens8f92df62010-12-31 18:59:19 +0000131{
132 struct sk_buff *buf_copy;
133 struct tipc_node *n_ptr;
Ying Xue78dfb782014-03-27 12:54:32 +0800134 struct tipc_link *l_ptr;
Allan Stephens8f92df62010-12-31 18:59:19 +0000135
Ying Xue6c7a7622014-03-27 12:54:37 +0800136 rcu_read_lock();
137 list_for_each_entry_rcu(n_ptr, &tipc_node_list, list) {
Ying Xue5356f3d2014-05-05 08:56:09 +0800138 tipc_node_lock(n_ptr);
Ying Xue78dfb782014-03-27 12:54:32 +0800139 l_ptr = n_ptr->active_links[n_ptr->addr & 1];
140 if (l_ptr) {
Allan Stephens8f92df62010-12-31 18:59:19 +0000141 buf_copy = skb_copy(buf, GFP_ATOMIC);
Ying Xue78dfb782014-03-27 12:54:32 +0800142 if (!buf_copy) {
Ying Xue5356f3d2014-05-05 08:56:09 +0800143 tipc_node_unlock(n_ptr);
Allan Stephens8f92df62010-12-31 18:59:19 +0000144 break;
Ying Xue78dfb782014-03-27 12:54:32 +0800145 }
Allan Stephens8f92df62010-12-31 18:59:19 +0000146 msg_set_destnode(buf_msg(buf_copy), n_ptr->addr);
Ying Xue78dfb782014-03-27 12:54:32 +0800147 __tipc_link_xmit(l_ptr, buf_copy);
Allan Stephens8f92df62010-12-31 18:59:19 +0000148 }
Ying Xue5356f3d2014-05-05 08:56:09 +0800149 tipc_node_unlock(n_ptr);
Allan Stephens8f92df62010-12-31 18:59:19 +0000150 }
Ying Xue6c7a7622014-03-27 12:54:37 +0800151 rcu_read_unlock();
Allan Stephens8f92df62010-12-31 18:59:19 +0000152
Allan Stephens5f6d9122011-11-04 13:24:29 -0400153 kfree_skb(buf);
Allan Stephens8f92df62010-12-31 18:59:19 +0000154}
155
Per Lidenb97bf3f2006-01-02 19:04:38 +0100156/**
Per Liden4323add2006-01-18 00:38:21 +0100157 * tipc_named_publish - tell other nodes about a new publication by this node
Per Lidenb97bf3f2006-01-02 19:04:38 +0100158 */
Ying Xueeab8c0452014-04-28 18:00:10 +0800159struct sk_buff *tipc_named_publish(struct publication *publ)
Per Lidenb97bf3f2006-01-02 19:04:38 +0100160{
161 struct sk_buff *buf;
162 struct distr_item *item;
163
Allan Stephensa9098042012-04-17 17:57:52 -0400164 list_add_tail(&publ->local_list, &publ_lists[publ->scope]->list);
165 publ_lists[publ->scope]->size++;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100166
Allan Stephens1110b8d2012-04-17 17:57:52 -0400167 if (publ->scope == TIPC_NODE_SCOPE)
Ying Xueeab8c0452014-04-28 18:00:10 +0800168 return NULL;
Allan Stephens1110b8d2012-04-17 17:57:52 -0400169
Per Lidenb97bf3f2006-01-02 19:04:38 +0100170 buf = named_prepare_buf(PUBLICATION, ITEM_SIZE, 0);
171 if (!buf) {
Erik Hugne2cf8aa12012-06-29 00:16:37 -0400172 pr_warn("Publication distribution failure\n");
Ying Xueeab8c0452014-04-28 18:00:10 +0800173 return NULL;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100174 }
175
176 item = (struct distr_item *)msg_data(buf_msg(buf));
177 publ_to_item(item, publ);
Ying Xueeab8c0452014-04-28 18:00:10 +0800178 return buf;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100179}
180
181/**
Per Liden4323add2006-01-18 00:38:21 +0100182 * tipc_named_withdraw - tell other nodes about a withdrawn publication by this node
Per Lidenb97bf3f2006-01-02 19:04:38 +0100183 */
Ying Xueeab8c0452014-04-28 18:00:10 +0800184struct sk_buff *tipc_named_withdraw(struct publication *publ)
Per Lidenb97bf3f2006-01-02 19:04:38 +0100185{
186 struct sk_buff *buf;
187 struct distr_item *item;
188
189 list_del(&publ->local_list);
Allan Stephensa9098042012-04-17 17:57:52 -0400190 publ_lists[publ->scope]->size--;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100191
Allan Stephens1110b8d2012-04-17 17:57:52 -0400192 if (publ->scope == TIPC_NODE_SCOPE)
Ying Xueeab8c0452014-04-28 18:00:10 +0800193 return NULL;
Allan Stephens1110b8d2012-04-17 17:57:52 -0400194
Per Lidenb97bf3f2006-01-02 19:04:38 +0100195 buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0);
196 if (!buf) {
Erik Hugne2cf8aa12012-06-29 00:16:37 -0400197 pr_warn("Withdrawal distribution failure\n");
Ying Xueeab8c0452014-04-28 18:00:10 +0800198 return NULL;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100199 }
200
201 item = (struct distr_item *)msg_data(buf_msg(buf));
202 publ_to_item(item, publ);
Ying Xueeab8c0452014-04-28 18:00:10 +0800203 return buf;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100204}
205
Allan Stephense11aa052012-04-17 17:57:52 -0400206/*
207 * named_distribute - prepare name info for bulk distribution to another node
208 */
209static void named_distribute(struct list_head *message_list, u32 node,
210 struct publ_list *pls, u32 max_item_buf)
211{
212 struct publication *publ;
213 struct sk_buff *buf = NULL;
214 struct distr_item *item = NULL;
215 u32 left = 0;
216 u32 rest = pls->size * ITEM_SIZE;
217
218 list_for_each_entry(publ, &pls->list, local_list) {
219 if (!buf) {
220 left = (rest <= max_item_buf) ? rest : max_item_buf;
221 rest -= left;
222 buf = named_prepare_buf(PUBLICATION, left, node);
223 if (!buf) {
Erik Hugne2cf8aa12012-06-29 00:16:37 -0400224 pr_warn("Bulk publication failure\n");
Allan Stephense11aa052012-04-17 17:57:52 -0400225 return;
226 }
227 item = (struct distr_item *)msg_data(buf_msg(buf));
228 }
229 publ_to_item(item, publ);
230 item++;
231 left -= ITEM_SIZE;
232 if (!left) {
233 list_add_tail((struct list_head *)buf, message_list);
234 buf = NULL;
235 }
236 }
237}
238
Per Lidenb97bf3f2006-01-02 19:04:38 +0100239/**
Per Liden4323add2006-01-18 00:38:21 +0100240 * tipc_named_node_up - tell specified node about all publications by this node
Per Lidenb97bf3f2006-01-02 19:04:38 +0100241 */
Paul Gortmaker1c553bb2011-09-02 13:45:34 -0400242void tipc_named_node_up(unsigned long nodearg)
Per Lidenb97bf3f2006-01-02 19:04:38 +0100243{
Allan Stephens149ce372011-05-31 11:05:02 -0400244 struct tipc_node *n_ptr;
Paul Gortmakera18c4bc2011-12-29 20:58:42 -0500245 struct tipc_link *l_ptr;
Allan Stephens9aa88c22011-05-31 13:38:02 -0400246 struct list_head message_list;
Paul Gortmaker1c553bb2011-09-02 13:45:34 -0400247 u32 node = (u32)nodearg;
Allan Stephens149ce372011-05-31 11:05:02 -0400248 u32 max_item_buf = 0;
249
250 /* compute maximum amount of publication data to send per message */
Paul Gortmaker1c553bb2011-09-02 13:45:34 -0400251 n_ptr = tipc_node_find(node);
Allan Stephens149ce372011-05-31 11:05:02 -0400252 if (n_ptr) {
253 tipc_node_lock(n_ptr);
254 l_ptr = n_ptr->active_links[0];
255 if (l_ptr)
256 max_item_buf = ((l_ptr->max_pkt - INT_H_SIZE) /
257 ITEM_SIZE) * ITEM_SIZE;
258 tipc_node_unlock(n_ptr);
259 }
Allan Stephens149ce372011-05-31 11:05:02 -0400260 if (!max_item_buf)
261 return;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100262
Allan Stephens9aa88c22011-05-31 13:38:02 -0400263 /* create list of publication messages, then send them as a unit */
Allan Stephens9aa88c22011-05-31 13:38:02 -0400264 INIT_LIST_HEAD(&message_list);
265
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900266 read_lock_bh(&tipc_nametbl_lock);
Allan Stephense11aa052012-04-17 17:57:52 -0400267 named_distribute(&message_list, node, &publ_cluster, max_item_buf);
Allan Stephensa9098042012-04-17 17:57:52 -0400268 named_distribute(&message_list, node, &publ_zone, max_item_buf);
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900269 read_unlock_bh(&tipc_nametbl_lock);
Allan Stephens9aa88c22011-05-31 13:38:02 -0400270
Ying Xue247f0f32014-02-18 16:06:46 +0800271 tipc_link_names_xmit(&message_list, node);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100272}
273
274/**
Allan Stephensf1379172011-02-23 14:13:41 -0500275 * named_purge_publ - remove publication associated with a failed node
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900276 *
277 * Invoked for each publication issued by a newly failed node.
Per Lidenb97bf3f2006-01-02 19:04:38 +0100278 * Removes publication structure from name table & deletes it.
Per Lidenb97bf3f2006-01-02 19:04:38 +0100279 */
Allan Stephensf1379172011-02-23 14:13:41 -0500280static void named_purge_publ(struct publication *publ)
Per Lidenb97bf3f2006-01-02 19:04:38 +0100281{
282 struct publication *p;
Allan Stephensf1310722006-06-25 23:51:37 -0700283
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900284 write_lock_bh(&tipc_nametbl_lock);
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900285 p = tipc_nametbl_remove_publ(publ->type, publ->lower,
Per Liden4323add2006-01-18 00:38:21 +0100286 publ->node, publ->ref, publ->key);
Allan Stephens431697e2011-02-23 13:51:15 -0500287 if (p)
288 tipc_nodesub_unsubscribe(&p->subscr);
Per Liden4323add2006-01-18 00:38:21 +0100289 write_unlock_bh(&tipc_nametbl_lock);
Allan Stephensf1310722006-06-25 23:51:37 -0700290
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900291 if (p != publ) {
Erik Hugne2cf8aa12012-06-29 00:16:37 -0400292 pr_err("Unable to remove publication from failed node\n"
293 " (type=%u, lower=%u, node=0x%x, ref=%u, key=%u)\n",
294 publ->type, publ->lower, publ->node, publ->ref,
295 publ->key);
Allan Stephensf1310722006-06-25 23:51:37 -0700296 }
297
Allan Stephense83504f2010-12-31 18:59:30 +0000298 kfree(p);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100299}
300
301/**
Ying Xue247f0f32014-02-18 16:06:46 +0800302 * tipc_named_rcv - process name table update message sent by another node
Per Lidenb97bf3f2006-01-02 19:04:38 +0100303 */
Ying Xue247f0f32014-02-18 16:06:46 +0800304void tipc_named_rcv(struct sk_buff *buf)
Per Lidenb97bf3f2006-01-02 19:04:38 +0100305{
306 struct publication *publ;
307 struct tipc_msg *msg = buf_msg(buf);
308 struct distr_item *item = (struct distr_item *)msg_data(msg);
309 u32 count = msg_data_sz(msg) / ITEM_SIZE;
310
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900311 write_lock_bh(&tipc_nametbl_lock);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100312 while (count--) {
313 if (msg_type(msg) == PUBLICATION) {
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900314 publ = tipc_nametbl_insert_publ(ntohl(item->type),
Per Liden4323add2006-01-18 00:38:21 +0100315 ntohl(item->lower),
316 ntohl(item->upper),
317 TIPC_CLUSTER_SCOPE,
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900318 msg_orignode(msg),
Per Liden4323add2006-01-18 00:38:21 +0100319 ntohl(item->ref),
320 ntohl(item->key));
Per Lidenb97bf3f2006-01-02 19:04:38 +0100321 if (publ) {
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900322 tipc_nodesub_subscribe(&publ->subscr,
323 msg_orignode(msg),
Per Liden4323add2006-01-18 00:38:21 +0100324 publ,
Allan Stephensf1379172011-02-23 14:13:41 -0500325 (net_ev_handler)
326 named_purge_publ);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100327 }
328 } else if (msg_type(msg) == WITHDRAWAL) {
Per Liden4323add2006-01-18 00:38:21 +0100329 publ = tipc_nametbl_remove_publ(ntohl(item->type),
330 ntohl(item->lower),
331 msg_orignode(msg),
332 ntohl(item->ref),
333 ntohl(item->key));
Per Lidenb97bf3f2006-01-02 19:04:38 +0100334
335 if (publ) {
Per Liden4323add2006-01-18 00:38:21 +0100336 tipc_nodesub_unsubscribe(&publ->subscr);
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900337 kfree(publ);
Allan Stephensf1310722006-06-25 23:51:37 -0700338 } else {
Erik Hugne2cf8aa12012-06-29 00:16:37 -0400339 pr_err("Unable to remove publication by node 0x%x\n"
340 " (type=%u, lower=%u, ref=%u, key=%u)\n",
341 msg_orignode(msg), ntohl(item->type),
342 ntohl(item->lower), ntohl(item->ref),
343 ntohl(item->key));
Per Lidenb97bf3f2006-01-02 19:04:38 +0100344 }
345 } else {
Erik Hugne2cf8aa12012-06-29 00:16:37 -0400346 pr_warn("Unrecognized name table message received\n");
Per Lidenb97bf3f2006-01-02 19:04:38 +0100347 }
348 item++;
349 }
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900350 write_unlock_bh(&tipc_nametbl_lock);
Allan Stephens5f6d9122011-11-04 13:24:29 -0400351 kfree_skb(buf);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100352}
353
354/**
Allan Stephens1110b8d2012-04-17 17:57:52 -0400355 * tipc_named_reinit - re-initialize local publications
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900356 *
Allan Stephens945af1c2011-10-14 14:42:25 -0400357 * This routine is called whenever TIPC networking is enabled.
Allan Stephens1110b8d2012-04-17 17:57:52 -0400358 * All name table entries published by this node are updated to reflect
359 * the node's new network address.
Per Lidenb97bf3f2006-01-02 19:04:38 +0100360 */
Per Liden4323add2006-01-18 00:38:21 +0100361void tipc_named_reinit(void)
Per Lidenb97bf3f2006-01-02 19:04:38 +0100362{
363 struct publication *publ;
Allan Stephensa9098042012-04-17 17:57:52 -0400364 int scope;
Per Lidenb97bf3f2006-01-02 19:04:38 +0100365
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900366 write_lock_bh(&tipc_nametbl_lock);
Allan Stephens945af1c2011-10-14 14:42:25 -0400367
Allan Stephens1110b8d2012-04-17 17:57:52 -0400368 for (scope = TIPC_ZONE_SCOPE; scope <= TIPC_NODE_SCOPE; scope++)
Allan Stephensa9098042012-04-17 17:57:52 -0400369 list_for_each_entry(publ, &publ_lists[scope]->list, local_list)
370 publ->node = tipc_own_addr;
Allan Stephens945af1c2011-10-14 14:42:25 -0400371
YOSHIFUJI Hideakic4307282007-02-09 23:25:21 +0900372 write_unlock_bh(&tipc_nametbl_lock);
Per Lidenb97bf3f2006-01-02 19:04:38 +0100373}