aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/discover.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/discover.c')
-rw-r--r--net/tipc/discover.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index 4a7cd3719b78..fa026bd91a68 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -35,12 +35,8 @@
35 */ 35 */
36 36
37#include "core.h" 37#include "core.h"
38#include "dbg.h"
39#include "link.h" 38#include "link.h"
40#include "zone.h"
41#include "discover.h" 39#include "discover.h"
42#include "port.h"
43#include "name_table.h"
44 40
45#define TIPC_LINK_REQ_INIT 125 /* min delay during bearer start up */ 41#define TIPC_LINK_REQ_INIT 125 /* min delay during bearer start up */
46#define TIPC_LINK_REQ_FAST 2000 /* normal delay if bearer has no links */ 42#define TIPC_LINK_REQ_FAST 2000 /* normal delay if bearer has no links */
@@ -134,8 +130,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
134 u32 net_id = msg_bc_netid(msg); 130 u32 net_id = msg_bc_netid(msg);
135 u32 type = msg_type(msg); 131 u32 type = msg_type(msg);
136 132
137 msg_get_media_addr(msg,&media_addr); 133 msg_get_media_addr(msg, &media_addr);
138 msg_dbg(msg, "RECV:");
139 buf_discard(buf); 134 buf_discard(buf);
140 135
141 if (net_id != tipc_net_id) 136 if (net_id != tipc_net_id)
@@ -151,10 +146,6 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
151 } 146 }
152 if (!tipc_in_scope(dest, tipc_own_addr)) 147 if (!tipc_in_scope(dest, tipc_own_addr))
153 return; 148 return;
154 if (is_slave(tipc_own_addr) && is_slave(orig))
155 return;
156 if (is_slave(orig) && !in_own_cluster(orig))
157 return;
158 if (in_own_cluster(orig)) { 149 if (in_own_cluster(orig)) {
159 /* Always accept link here */ 150 /* Always accept link here */
160 struct sk_buff *rbuf; 151 struct sk_buff *rbuf;
@@ -162,7 +153,6 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
162 struct tipc_node *n_ptr = tipc_node_find(orig); 153 struct tipc_node *n_ptr = tipc_node_find(orig);
163 int link_fully_up; 154 int link_fully_up;
164 155
165 dbg(" in own cluster\n");
166 if (n_ptr == NULL) { 156 if (n_ptr == NULL) {
167 n_ptr = tipc_node_create(orig); 157 n_ptr = tipc_node_create(orig);
168 if (!n_ptr) 158 if (!n_ptr)
@@ -179,7 +169,6 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
179 169
180 link = n_ptr->links[b_ptr->identity]; 170 link = n_ptr->links[b_ptr->identity];
181 if (!link) { 171 if (!link) {
182 dbg("creating link\n");
183 link = tipc_link_create(b_ptr, orig, &media_addr); 172 link = tipc_link_create(b_ptr, orig, &media_addr);
184 if (!link) { 173 if (!link) {
185 spin_unlock_bh(&n_ptr->lock); 174 spin_unlock_bh(&n_ptr->lock);
@@ -204,7 +193,6 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
204 return; 193 return;
205 rbuf = tipc_disc_init_msg(DSC_RESP_MSG, 1, orig, b_ptr); 194 rbuf = tipc_disc_init_msg(DSC_RESP_MSG, 1, orig, b_ptr);
206 if (rbuf != NULL) { 195 if (rbuf != NULL) {
207 msg_dbg(buf_msg(rbuf),"SEND:");
208 b_ptr->media->send_msg(rbuf, &b_ptr->publ, &media_addr); 196 b_ptr->media->send_msg(rbuf, &b_ptr->publ, &media_addr);
209 buf_discard(rbuf); 197 buf_discard(rbuf);
210 } 198 }