diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/discover.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index dcadc10dffd1..2830709957bd 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -287,7 +287,6 @@ static void tipc_disc_timeout(struct timer_list *t) | |||
287 | { | 287 | { |
288 | struct tipc_discoverer *d = from_timer(d, t, timer); | 288 | struct tipc_discoverer *d = from_timer(d, t, timer); |
289 | struct tipc_net *tn = tipc_net(d->net); | 289 | struct tipc_net *tn = tipc_net(d->net); |
290 | u32 self = tipc_own_addr(d->net); | ||
291 | struct tipc_media_addr maddr; | 290 | struct tipc_media_addr maddr; |
292 | struct sk_buff *skb = NULL; | 291 | struct sk_buff *skb = NULL; |
293 | struct net *net = d->net; | 292 | struct net *net = d->net; |
@@ -301,12 +300,14 @@ static void tipc_disc_timeout(struct timer_list *t) | |||
301 | goto exit; | 300 | goto exit; |
302 | } | 301 | } |
303 | 302 | ||
304 | /* Did we just leave the address trial period ? */ | 303 | /* Trial period over ? */ |
305 | if (!self && !time_before(jiffies, tn->addr_trial_end)) { | 304 | if (!time_before(jiffies, tn->addr_trial_end)) { |
306 | self = tn->trial_addr; | 305 | /* Did we just leave it ? */ |
307 | tipc_net_finalize(net, self); | 306 | if (!tipc_own_addr(net)) |
308 | msg_set_prevnode(buf_msg(d->skb), self); | 307 | tipc_net_finalize(net, tn->trial_addr); |
308 | |||
309 | msg_set_type(buf_msg(d->skb), DSC_REQ_MSG); | 309 | msg_set_type(buf_msg(d->skb), DSC_REQ_MSG); |
310 | msg_set_prevnode(buf_msg(d->skb), tipc_own_addr(net)); | ||
310 | } | 311 | } |
311 | 312 | ||
312 | /* Adjust timeout interval according to discovery phase */ | 313 | /* Adjust timeout interval according to discovery phase */ |