diff options
author | Holger Brunck <holger.brunck@keymile.com> | 2014-11-14 12:33:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-16 14:27:17 -0500 |
commit | 0372bf5c096217447157d41c3eee1fab1bac6c7e (patch) | |
tree | e0a81e95beba078bca69bb597bd454a79ad6c62f /net/tipc/link.c | |
parent | a77f9c5dcdf8480a93332792c336fa2bf9d31229 (diff) |
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 <holger.brunck@keymile.com>
Reviewed-By: Jon Maloy <jon.maloy@ericsson.com>
cc: Ying Xue <ying.xue@windriver.com>
cc: Erik Hugne <erik.hugne@ericsson.com>
cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 5 |
1 files changed, 3 insertions, 2 deletions
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, | |||
224 | char addr_string[16]; | 224 | char addr_string[16]; |
225 | u32 peer = n_ptr->addr; | 225 | u32 peer = n_ptr->addr; |
226 | 226 | ||
227 | if (n_ptr->link_cnt >= 2) { | 227 | if (n_ptr->link_cnt >= MAX_BEARERS) { |
228 | tipc_addr_string_fill(addr_string, n_ptr->addr); | 228 | tipc_addr_string_fill(addr_string, n_ptr->addr); |
229 | pr_err("Attempt to establish third link to %s\n", addr_string); | 229 | pr_err("Attempt to establish %uth link to %s. Max %u allowed.\n", |
230 | n_ptr->link_cnt, addr_string, MAX_BEARERS); | ||
230 | return NULL; | 231 | return NULL; |
231 | } | 232 | } |
232 | 233 | ||