From: Holger Brunck Date: Fri, 14 Nov 2014 17:33:19 +0000 (+0100) Subject: tipc: allow one link per bearer to neighboring nodes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0372bf5c096217447157d41c3eee1fab1bac6c7e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git tipc: allow one link per bearer to neighboring nodes There is no reason to limit the amount of possible links to a neighboring node to 2. If we have more then two bearers we can also establish more links. Signed-off-by: Holger Brunck Reviewed-By: Jon Maloy cc: Ying Xue cc: Erik Hugne cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- diff --git a/net/tipc/link.c b/net/tipc/link.c index 1db162aa64a5..7cf8004577f1 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; }