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.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index 2830709957bd..c138d68e8a69 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -166,7 +166,8 @@ static bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
166 166
167 /* Apply trial address if we just left trial period */ 167 /* Apply trial address if we just left trial period */
168 if (!trial && !self) { 168 if (!trial && !self) {
169 tipc_net_finalize(net, tn->trial_addr); 169 tipc_sched_net_finalize(net, tn->trial_addr);
170 msg_set_prevnode(buf_msg(d->skb), tn->trial_addr);
170 msg_set_type(buf_msg(d->skb), DSC_REQ_MSG); 171 msg_set_type(buf_msg(d->skb), DSC_REQ_MSG);
171 } 172 }
172 173
@@ -300,14 +301,12 @@ static void tipc_disc_timeout(struct timer_list *t)
300 goto exit; 301 goto exit;
301 } 302 }
302 303
303 /* Trial period over ? */ 304 /* Did we just leave trial period ? */
304 if (!time_before(jiffies, tn->addr_trial_end)) { 305 if (!time_before(jiffies, tn->addr_trial_end) && !tipc_own_addr(net)) {
305 /* Did we just leave it ? */ 306 mod_timer(&d->timer, jiffies + TIPC_DISC_INIT);
306 if (!tipc_own_addr(net)) 307 spin_unlock_bh(&d->lock);
307 tipc_net_finalize(net, tn->trial_addr); 308 tipc_sched_net_finalize(net, tn->trial_addr);
308 309 return;
309 msg_set_type(buf_msg(d->skb), DSC_REQ_MSG);
310 msg_set_prevnode(buf_msg(d->skb), tipc_own_addr(net));
311 } 310 }
312 311
313 /* Adjust timeout interval according to discovery phase */ 312 /* Adjust timeout interval according to discovery phase */
@@ -319,6 +318,8 @@ static void tipc_disc_timeout(struct timer_list *t)
319 d->timer_intv = TIPC_DISC_SLOW; 318 d->timer_intv = TIPC_DISC_SLOW;
320 else if (!d->num_nodes && d->timer_intv > TIPC_DISC_FAST) 319 else if (!d->num_nodes && d->timer_intv > TIPC_DISC_FAST)
321 d->timer_intv = TIPC_DISC_FAST; 320 d->timer_intv = TIPC_DISC_FAST;
321 msg_set_type(buf_msg(d->skb), DSC_REQ_MSG);
322 msg_set_prevnode(buf_msg(d->skb), tn->trial_addr);
322 } 323 }
323 324
324 mod_timer(&d->timer, jiffies + d->timer_intv); 325 mod_timer(&d->timer, jiffies + d->timer_intv);