config.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /*
  2. * net/tipc/config.c: TIPC configuration management code
  3. *
  4. * Copyright (c) 2002-2006, Ericsson AB
  5. * Copyright (c) 2004-2007, Wind River Systems
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions are met:
  10. *
  11. * 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.
  19. *
  20. * 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
  34. * POSSIBILITY OF SUCH DAMAGE.
  35. */
  36. #include "core.h"
  37. #include "port.h"
  38. #include "link.h"
  39. #include "name_table.h"
  40. #include "config.h"
  41. static u32 config_port_ref;
  42. static DEFINE_SPINLOCK(config_lock);
  43. static const void *req_tlv_area; /* request message TLV area */
  44. static int req_tlv_space; /* request message TLV area size */
  45. static int rep_headroom; /* reply message headroom to use */
  46. struct sk_buff *tipc_cfg_reply_alloc(int payload_size)
  47. {
  48. struct sk_buff *buf;
  49. buf = alloc_skb(rep_headroom + payload_size, GFP_ATOMIC);
  50. if (buf)
  51. skb_reserve(buf, rep_headroom);
  52. return buf;
  53. }
  54. int tipc_cfg_append_tlv(struct sk_buff *buf, int tlv_type,
  55. void *tlv_data, int tlv_data_size)
  56. {
  57. struct tlv_desc *tlv = (struct tlv_desc *)skb_tail_pointer(buf);
  58. int new_tlv_space = TLV_SPACE(tlv_data_size);
  59. if (skb_tailroom(buf) < new_tlv_space)
  60. return 0;
  61. skb_put(buf, new_tlv_space);
  62. tlv->tlv_type = htons(tlv_type);
  63. tlv->tlv_len = htons(TLV_LENGTH(tlv_data_size));
  64. if (tlv_data_size && tlv_data)
  65. memcpy(TLV_DATA(tlv), tlv_data, tlv_data_size);
  66. return 1;
  67. }
  68. static struct sk_buff *tipc_cfg_reply_unsigned_type(u16 tlv_type, u32 value)
  69. {
  70. struct sk_buff *buf;
  71. __be32 value_net;
  72. buf = tipc_cfg_reply_alloc(TLV_SPACE(sizeof(value)));
  73. if (buf) {
  74. value_net = htonl(value);
  75. tipc_cfg_append_tlv(buf, tlv_type, &value_net,
  76. sizeof(value_net));
  77. }
  78. return buf;
  79. }
  80. static struct sk_buff *tipc_cfg_reply_unsigned(u32 value)
  81. {
  82. return tipc_cfg_reply_unsigned_type(TIPC_TLV_UNSIGNED, value);
  83. }
  84. struct sk_buff *tipc_cfg_reply_string_type(u16 tlv_type, char *string)
  85. {
  86. struct sk_buff *buf;
  87. int string_len = strlen(string) + 1;
  88. buf = tipc_cfg_reply_alloc(TLV_SPACE(string_len));
  89. if (buf)
  90. tipc_cfg_append_tlv(buf, tlv_type, string, string_len);
  91. return buf;
  92. }
  93. #define MAX_STATS_INFO 2000
  94. static struct sk_buff *tipc_show_stats(void)
  95. {
  96. struct sk_buff *buf;
  97. struct tlv_desc *rep_tlv;
  98. struct print_buf pb;
  99. int str_len;
  100. u32 value;
  101. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  102. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  103. value = ntohl(*(u32 *)TLV_DATA(req_tlv_area));
  104. if (value != 0)
  105. return tipc_cfg_reply_error_string("unsupported argument");
  106. buf = tipc_cfg_reply_alloc(TLV_SPACE(MAX_STATS_INFO));
  107. if (buf == NULL)
  108. return NULL;
  109. rep_tlv = (struct tlv_desc *)buf->data;
  110. tipc_printbuf_init(&pb, (char *)TLV_DATA(rep_tlv), MAX_STATS_INFO);
  111. tipc_printf(&pb, "TIPC version " TIPC_MOD_VER "\n");
  112. /* Use additional tipc_printf()'s to return more info ... */
  113. str_len = tipc_printbuf_validate(&pb);
  114. skb_put(buf, TLV_SPACE(str_len));
  115. TLV_SET(rep_tlv, TIPC_TLV_ULTRA_STRING, NULL, str_len);
  116. return buf;
  117. }
  118. static struct sk_buff *cfg_enable_bearer(void)
  119. {
  120. struct tipc_bearer_config *args;
  121. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_BEARER_CONFIG))
  122. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  123. args = (struct tipc_bearer_config *)TLV_DATA(req_tlv_area);
  124. if (tipc_enable_bearer(args->name,
  125. ntohl(args->detect_scope),
  126. ntohl(args->priority)))
  127. return tipc_cfg_reply_error_string("unable to enable bearer");
  128. return tipc_cfg_reply_none();
  129. }
  130. static struct sk_buff *cfg_disable_bearer(void)
  131. {
  132. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_BEARER_NAME))
  133. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  134. if (tipc_disable_bearer((char *)TLV_DATA(req_tlv_area)))
  135. return tipc_cfg_reply_error_string("unable to disable bearer");
  136. return tipc_cfg_reply_none();
  137. }
  138. static struct sk_buff *cfg_set_own_addr(void)
  139. {
  140. u32 addr;
  141. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR))
  142. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  143. addr = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  144. if (addr == tipc_own_addr)
  145. return tipc_cfg_reply_none();
  146. if (!tipc_addr_node_valid(addr))
  147. return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
  148. " (node address)");
  149. if (tipc_mode == TIPC_NET_MODE)
  150. return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  151. " (cannot change node address once assigned)");
  152. /*
  153. * Must release all spinlocks before calling start_net() because
  154. * Linux version of TIPC calls eth_media_start() which calls
  155. * register_netdevice_notifier() which may block!
  156. *
  157. * Temporarily releasing the lock should be harmless for non-Linux TIPC,
  158. * but Linux version of eth_media_start() should really be reworked
  159. * so that it can be called with spinlocks held.
  160. */
  161. spin_unlock_bh(&config_lock);
  162. tipc_core_start_net(addr);
  163. spin_lock_bh(&config_lock);
  164. return tipc_cfg_reply_none();
  165. }
  166. static struct sk_buff *cfg_set_remote_mng(void)
  167. {
  168. u32 value;
  169. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  170. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  171. value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  172. tipc_remote_management = (value != 0);
  173. return tipc_cfg_reply_none();
  174. }
  175. static struct sk_buff *cfg_set_max_publications(void)
  176. {
  177. u32 value;
  178. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  179. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  180. value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  181. if (value != delimit(value, 1, 65535))
  182. return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
  183. " (max publications must be 1-65535)");
  184. tipc_max_publications = value;
  185. return tipc_cfg_reply_none();
  186. }
  187. static struct sk_buff *cfg_set_max_subscriptions(void)
  188. {
  189. u32 value;
  190. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  191. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  192. value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  193. if (value != delimit(value, 1, 65535))
  194. return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
  195. " (max subscriptions must be 1-65535");
  196. tipc_max_subscriptions = value;
  197. return tipc_cfg_reply_none();
  198. }
  199. static struct sk_buff *cfg_set_max_ports(void)
  200. {
  201. u32 value;
  202. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  203. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  204. value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  205. if (value == tipc_max_ports)
  206. return tipc_cfg_reply_none();
  207. if (value != delimit(value, 127, 65535))
  208. return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
  209. " (max ports must be 127-65535)");
  210. if (tipc_mode != TIPC_NOT_RUNNING)
  211. return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  212. " (cannot change max ports while TIPC is active)");
  213. tipc_max_ports = value;
  214. return tipc_cfg_reply_none();
  215. }
  216. static struct sk_buff *cfg_set_max_nodes(void)
  217. {
  218. u32 value;
  219. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  220. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  221. value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  222. if (value == tipc_max_nodes)
  223. return tipc_cfg_reply_none();
  224. if (value != delimit(value, 8, 2047))
  225. return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
  226. " (max nodes must be 8-2047)");
  227. if (tipc_mode == TIPC_NET_MODE)
  228. return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  229. " (cannot change max nodes once TIPC has joined a network)");
  230. tipc_max_nodes = value;
  231. return tipc_cfg_reply_none();
  232. }
  233. static struct sk_buff *cfg_set_netid(void)
  234. {
  235. u32 value;
  236. if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
  237. return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
  238. value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
  239. if (value == tipc_net_id)
  240. return tipc_cfg_reply_none();
  241. if (value != delimit(value, 1, 9999))
  242. return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
  243. " (network id must be 1-9999)");
  244. if (tipc_mode == TIPC_NET_MODE)
  245. return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  246. " (cannot change network id once TIPC has joined a network)");
  247. tipc_net_id = value;
  248. return tipc_cfg_reply_none();
  249. }
  250. struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area,
  251. int request_space, int reply_headroom)
  252. {
  253. struct sk_buff *rep_tlv_buf;
  254. spin_lock_bh(&config_lock);
  255. /* Save request and reply details in a well-known location */
  256. req_tlv_area = request_area;
  257. req_tlv_space = request_space;
  258. rep_headroom = reply_headroom;
  259. /* Check command authorization */
  260. if (likely(orig_node == tipc_own_addr)) {
  261. /* command is permitted */
  262. } else if (cmd >= 0x8000) {
  263. rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  264. " (cannot be done remotely)");
  265. goto exit;
  266. } else if (!tipc_remote_management) {
  267. rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NO_REMOTE);
  268. goto exit;
  269. }
  270. else if (cmd >= 0x4000) {
  271. u32 domain = 0;
  272. if ((tipc_nametbl_translate(TIPC_ZM_SRV, 0, &domain) == 0) ||
  273. (domain != orig_node)) {
  274. rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_ZONE_MSTR);
  275. goto exit;
  276. }
  277. }
  278. /* Call appropriate processing routine */
  279. switch (cmd) {
  280. case TIPC_CMD_NOOP:
  281. rep_tlv_buf = tipc_cfg_reply_none();
  282. break;
  283. case TIPC_CMD_GET_NODES:
  284. rep_tlv_buf = tipc_node_get_nodes(req_tlv_area, req_tlv_space);
  285. break;
  286. case TIPC_CMD_GET_LINKS:
  287. rep_tlv_buf = tipc_node_get_links(req_tlv_area, req_tlv_space);
  288. break;
  289. case TIPC_CMD_SHOW_LINK_STATS:
  290. rep_tlv_buf = tipc_link_cmd_show_stats(req_tlv_area, req_tlv_space);
  291. break;
  292. case TIPC_CMD_RESET_LINK_STATS:
  293. rep_tlv_buf = tipc_link_cmd_reset_stats(req_tlv_area, req_tlv_space);
  294. break;
  295. case TIPC_CMD_SHOW_NAME_TABLE:
  296. rep_tlv_buf = tipc_nametbl_get(req_tlv_area, req_tlv_space);
  297. break;
  298. case TIPC_CMD_GET_BEARER_NAMES:
  299. rep_tlv_buf = tipc_bearer_get_names();
  300. break;
  301. case TIPC_CMD_GET_MEDIA_NAMES:
  302. rep_tlv_buf = tipc_media_get_names();
  303. break;
  304. case TIPC_CMD_SHOW_PORTS:
  305. rep_tlv_buf = tipc_port_get_ports();
  306. break;
  307. case TIPC_CMD_SET_LOG_SIZE:
  308. rep_tlv_buf = tipc_log_resize_cmd(req_tlv_area, req_tlv_space);
  309. break;
  310. case TIPC_CMD_DUMP_LOG:
  311. rep_tlv_buf = tipc_log_dump();
  312. break;
  313. case TIPC_CMD_SHOW_STATS:
  314. rep_tlv_buf = tipc_show_stats();
  315. break;
  316. case TIPC_CMD_SET_LINK_TOL:
  317. case TIPC_CMD_SET_LINK_PRI:
  318. case TIPC_CMD_SET_LINK_WINDOW:
  319. rep_tlv_buf = tipc_link_cmd_config(req_tlv_area, req_tlv_space, cmd);
  320. break;
  321. case TIPC_CMD_ENABLE_BEARER:
  322. rep_tlv_buf = cfg_enable_bearer();
  323. break;
  324. case TIPC_CMD_DISABLE_BEARER:
  325. rep_tlv_buf = cfg_disable_bearer();
  326. break;
  327. case TIPC_CMD_SET_NODE_ADDR:
  328. rep_tlv_buf = cfg_set_own_addr();
  329. break;
  330. case TIPC_CMD_SET_REMOTE_MNG:
  331. rep_tlv_buf = cfg_set_remote_mng();
  332. break;
  333. case TIPC_CMD_SET_MAX_PORTS:
  334. rep_tlv_buf = cfg_set_max_ports();
  335. break;
  336. case TIPC_CMD_SET_MAX_PUBL:
  337. rep_tlv_buf = cfg_set_max_publications();
  338. break;
  339. case TIPC_CMD_SET_MAX_SUBSCR:
  340. rep_tlv_buf = cfg_set_max_subscriptions();
  341. break;
  342. case TIPC_CMD_SET_MAX_NODES:
  343. rep_tlv_buf = cfg_set_max_nodes();
  344. break;
  345. case TIPC_CMD_SET_NETID:
  346. rep_tlv_buf = cfg_set_netid();
  347. break;
  348. case TIPC_CMD_GET_REMOTE_MNG:
  349. rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_remote_management);
  350. break;
  351. case TIPC_CMD_GET_MAX_PORTS:
  352. rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports);
  353. break;
  354. case TIPC_CMD_GET_MAX_PUBL:
  355. rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_publications);
  356. break;
  357. case TIPC_CMD_GET_MAX_SUBSCR:
  358. rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_subscriptions);
  359. break;
  360. case TIPC_CMD_GET_MAX_NODES:
  361. rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_nodes);
  362. break;
  363. case TIPC_CMD_GET_NETID:
  364. rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id);
  365. break;
  366. case TIPC_CMD_NOT_NET_ADMIN:
  367. rep_tlv_buf =
  368. tipc_cfg_reply_error_string(TIPC_CFG_NOT_NET_ADMIN);
  369. break;
  370. case TIPC_CMD_SET_MAX_ZONES:
  371. case TIPC_CMD_GET_MAX_ZONES:
  372. case TIPC_CMD_SET_MAX_SLAVES:
  373. case TIPC_CMD_GET_MAX_SLAVES:
  374. case TIPC_CMD_SET_MAX_CLUSTERS:
  375. case TIPC_CMD_GET_MAX_CLUSTERS:
  376. rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  377. " (obsolete command)");
  378. break;
  379. default:
  380. rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
  381. " (unknown command)");
  382. break;
  383. }
  384. /* Return reply buffer */
  385. exit:
  386. spin_unlock_bh(&config_lock);
  387. return rep_tlv_buf;
  388. }
  389. static void cfg_named_msg_event(void *userdata,
  390. u32 port_ref,
  391. struct sk_buff **buf,
  392. const unchar *msg,
  393. u32 size,
  394. u32 importance,
  395. struct tipc_portid const *orig,
  396. struct tipc_name_seq const *dest)
  397. {
  398. struct tipc_cfg_msg_hdr *req_hdr;
  399. struct tipc_cfg_msg_hdr *rep_hdr;
  400. struct sk_buff *rep_buf;
  401. /* Validate configuration message header (ignore invalid message) */
  402. req_hdr = (struct tipc_cfg_msg_hdr *)msg;
  403. if ((size < sizeof(*req_hdr)) ||
  404. (size != TCM_ALIGN(ntohl(req_hdr->tcm_len))) ||
  405. (ntohs(req_hdr->tcm_flags) != TCM_F_REQUEST)) {
  406. warn("Invalid configuration message discarded\n");
  407. return;
  408. }
  409. /* Generate reply for request (if can't, return request) */
  410. rep_buf = tipc_cfg_do_cmd(orig->node,
  411. ntohs(req_hdr->tcm_type),
  412. msg + sizeof(*req_hdr),
  413. size - sizeof(*req_hdr),
  414. BUF_HEADROOM + MAX_H_SIZE + sizeof(*rep_hdr));
  415. if (rep_buf) {
  416. skb_push(rep_buf, sizeof(*rep_hdr));
  417. rep_hdr = (struct tipc_cfg_msg_hdr *)rep_buf->data;
  418. memcpy(rep_hdr, req_hdr, sizeof(*rep_hdr));
  419. rep_hdr->tcm_len = htonl(rep_buf->len);
  420. rep_hdr->tcm_flags &= htons(~TCM_F_REQUEST);
  421. } else {
  422. rep_buf = *buf;
  423. *buf = NULL;
  424. }
  425. /* NEED TO ADD CODE TO HANDLE FAILED SEND (SUCH AS CONGESTION) */
  426. tipc_send_buf2port(port_ref, orig, rep_buf, rep_buf->len);
  427. }
  428. int tipc_cfg_init(void)
  429. {
  430. struct tipc_name_seq seq;
  431. int res;
  432. res = tipc_createport(NULL, TIPC_CRITICAL_IMPORTANCE,
  433. NULL, NULL, NULL,
  434. NULL, cfg_named_msg_event, NULL,
  435. NULL, &config_port_ref);
  436. if (res)
  437. goto failed;
  438. seq.type = TIPC_CFG_SRV;
  439. seq.lower = seq.upper = tipc_own_addr;
  440. res = tipc_nametbl_publish_rsv(config_port_ref, TIPC_ZONE_SCOPE, &seq);
  441. if (res)
  442. goto failed;
  443. return 0;
  444. failed:
  445. err("Unable to create configuration service\n");
  446. return res;
  447. }
  448. void tipc_cfg_stop(void)
  449. {
  450. if (config_port_ref) {
  451. tipc_deleteport(config_port_ref);
  452. config_port_ref = 0;
  453. }
  454. }