diff options
-rw-r--r-- | net/tipc/bcast.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 5ca8fdda63ca..8f58df24bac5 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -417,13 +417,19 @@ int tipc_bclink_send_msg(struct sk_buff *buf) | |||
417 | 417 | ||
418 | spin_lock_bh(&bc_lock); | 418 | spin_lock_bh(&bc_lock); |
419 | 419 | ||
420 | if (!bclink->bcast_nodes.count) { | ||
421 | res = msg_data_sz(buf_msg(buf)); | ||
422 | buf_discard(buf); | ||
423 | goto exit; | ||
424 | } | ||
425 | |||
420 | res = tipc_link_send_buf(bcl, buf); | 426 | res = tipc_link_send_buf(bcl, buf); |
421 | if (likely(res > 0)) | 427 | if (likely(res > 0)) |
422 | bclink_set_last_sent(); | 428 | bclink_set_last_sent(); |
423 | 429 | ||
424 | bcl->stats.queue_sz_counts++; | 430 | bcl->stats.queue_sz_counts++; |
425 | bcl->stats.accu_queue_sz += bcl->out_queue_size; | 431 | bcl->stats.accu_queue_sz += bcl->out_queue_size; |
426 | 432 | exit: | |
427 | spin_unlock_bh(&bc_lock); | 433 | spin_unlock_bh(&bc_lock); |
428 | return res; | 434 | return res; |
429 | } | 435 | } |