diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/discover.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index 2345268ca64b..580b50a79e43 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -201,14 +201,16 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) | |||
201 | 201 | ||
202 | /* Accept discovery message & send response, if necessary */ | 202 | /* Accept discovery message & send response, if necessary */ |
203 | link_fully_up = link_working_working(link); | 203 | link_fully_up = link_working_working(link); |
204 | tipc_node_unlock(n_ptr); | 204 | |
205 | if ((type == DSC_RESP_MSG) || link_fully_up) | 205 | if ((type == DSC_REQ_MSG) && !link_fully_up) { |
206 | return; | 206 | rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr); |
207 | rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr); | 207 | if (rbuf) { |
208 | if (rbuf != NULL) { | 208 | b_ptr->media->send_msg(rbuf, b_ptr, &media_addr); |
209 | b_ptr->media->send_msg(rbuf, b_ptr, &media_addr); | 209 | buf_discard(rbuf); |
210 | buf_discard(rbuf); | 210 | } |
211 | } | 211 | } |
212 | |||
213 | tipc_node_unlock(n_ptr); | ||
212 | } | 214 | } |
213 | 215 | ||
214 | /** | 216 | /** |