aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r--net/tipc/bearer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 329fb659fae4..5dfd89c40429 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -435,7 +435,7 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
435 u32 i; 435 u32 i;
436 int res = -EINVAL; 436 int res = -EINVAL;
437 437
438 if (tipc_mode != TIPC_NET_MODE) { 438 if (!tipc_own_addr) {
439 warn("Bearer <%s> rejected, not supported in standalone mode\n", 439 warn("Bearer <%s> rejected, not supported in standalone mode\n",
440 name); 440 name);
441 return -ENOPROTOOPT; 441 return -ENOPROTOOPT;
@@ -456,8 +456,7 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
456 warn("Bearer <%s> rejected, illegal discovery domain\n", name); 456 warn("Bearer <%s> rejected, illegal discovery domain\n", name);
457 return -EINVAL; 457 return -EINVAL;
458 } 458 }
459 if ((priority < TIPC_MIN_LINK_PRI || 459 if ((priority > TIPC_MAX_LINK_PRI) &&
460 priority > TIPC_MAX_LINK_PRI) &&
461 (priority != TIPC_MEDIA_LINK_PRI)) { 460 (priority != TIPC_MEDIA_LINK_PRI)) {
462 warn("Bearer <%s> rejected, illegal priority\n", name); 461 warn("Bearer <%s> rejected, illegal priority\n", name);
463 return -EINVAL; 462 return -EINVAL;