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.c44
1 files changed, 9 insertions, 35 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index fc1fcf5e6b53..4a7cd3719b78 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -46,16 +46,6 @@
46#define TIPC_LINK_REQ_FAST 2000 /* normal delay if bearer has no links */ 46#define TIPC_LINK_REQ_FAST 2000 /* normal delay if bearer has no links */
47#define TIPC_LINK_REQ_SLOW 600000 /* normal delay if bearer has links */ 47#define TIPC_LINK_REQ_SLOW 600000 /* normal delay if bearer has links */
48 48
49#if 0
50#define GET_NODE_INFO 300
51#define GET_NODE_INFO_RESULT 301
52#define FORWARD_LINK_PROBE 302
53#define LINK_REQUEST_REJECTED 303
54#define LINK_REQUEST_ACCEPTED 304
55#define DROP_LINK_REQUEST 305
56#define CHECK_LINK_COUNT 306
57#endif
58
59/* 49/*
60 * TODO: Most of the inter-cluster setup stuff should be 50 * TODO: Most of the inter-cluster setup stuff should be
61 * rewritten, and be made conformant with specification. 51 * rewritten, and be made conformant with specification.
@@ -78,30 +68,6 @@ struct link_req {
78 unsigned int timer_intv; 68 unsigned int timer_intv;
79}; 69};
80 70
81
82#if 0
83int disc_create_link(const struct tipc_link_create *argv)
84{
85 /*
86 * Code for inter cluster link setup here
87 */
88 return TIPC_OK;
89}
90#endif
91
92/*
93 * disc_lost_link(): A link has lost contact
94 */
95
96void tipc_disc_link_event(u32 addr, char *name, int up)
97{
98 if (in_own_cluster(addr))
99 return;
100 /*
101 * Code for inter cluster link setup here
102 */
103}
104
105/** 71/**
106 * tipc_disc_init_msg - initialize a link setup message 72 * tipc_disc_init_msg - initialize a link setup message
107 * @type: message type (request or response) 73 * @type: message type (request or response)
@@ -115,7 +81,7 @@ static struct sk_buff *tipc_disc_init_msg(u32 type,
115 u32 dest_domain, 81 u32 dest_domain,
116 struct bearer *b_ptr) 82 struct bearer *b_ptr)
117{ 83{
118 struct sk_buff *buf = buf_acquire(DSC_H_SIZE); 84 struct sk_buff *buf = tipc_buf_acquire(DSC_H_SIZE);
119 struct tipc_msg *msg; 85 struct tipc_msg *msg;
120 86
121 if (buf) { 87 if (buf) {
@@ -203,6 +169,14 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
203 return; 169 return;
204 } 170 }
205 spin_lock_bh(&n_ptr->lock); 171 spin_lock_bh(&n_ptr->lock);
172
173 /* Don't talk to neighbor during cleanup after last session */
174
175 if (n_ptr->cleanup_required) {
176 spin_unlock_bh(&n_ptr->lock);
177 return;
178 }
179
206 link = n_ptr->links[b_ptr->identity]; 180 link = n_ptr->links[b_ptr->identity];
207 if (!link) { 181 if (!link) {
208 dbg("creating link\n"); 182 dbg("creating link\n");