diff --git a/net/tipc/link.c b/net/tipc/link.c index 1db162aa64a5d0540cfc3538daa83056769776fc..7cf8004577f153b6a79482dc4f44fff6f42fe733 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -224,9 +224,10 @@ struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, char addr_string[16]; u32 peer = n_ptr->addr; - if (n_ptr->link_cnt >= 2) { + if (n_ptr->link_cnt >= MAX_BEARERS) { tipc_addr_string_fill(addr_string, n_ptr->addr); - pr_err("Attempt to establish third link to %s\n", addr_string); + pr_err("Attempt to establish %uth link to %s. Max %u allowed.\n", + n_ptr->link_cnt, addr_string, MAX_BEARERS); return NULL; }