summaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-02-29 23:52:12 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-29 23:52:12 -0500
commit06b8db9cac717fcd6b8410b9efae8aca33b4b9e6 (patch)
tree446f012fcc33602e7ce2e5ec5b6e3df7eb435c63 /net/tipc/bearer.c
parent9100eb012a31dcc3f6eff1f09eb9e118b1e5b6c4 (diff)
parent9bbbc59dbd4e69da078b65a7f708c4250984dd29 (diff)
downloadlinux-stable-06b8db9cac717fcd6b8410b9efae8aca33b4b9e6.tar.gz
linux-stable-06b8db9cac717fcd6b8410b9efae8aca33b4b9e6.tar.bz2
linux-stable-06b8db9cac717fcd6b8410b9efae8aca33b4b9e6.zip
Merge branch 'tipc_net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
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)
u32 i;
int res = -EINVAL;
- if (tipc_mode != TIPC_NET_MODE) {
+ if (!tipc_own_addr) {
warn("Bearer <%s> rejected, not supported in standalone mode\n",
name);
return -ENOPROTOOPT;
@@ -456,8 +456,7 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
warn("Bearer <%s> rejected, illegal discovery domain\n", name);
return -EINVAL;
}
- if ((priority < TIPC_MIN_LINK_PRI ||
- priority > TIPC_MAX_LINK_PRI) &&
+ if ((priority > TIPC_MAX_LINK_PRI) &&
(priority != TIPC_MEDIA_LINK_PRI)) {
warn("Bearer <%s> rejected, illegal priority\n", name);
return -EINVAL;