diff options
-rw-r--r-- | net/tipc/name_table.c | 7 | ||||
-rw-r--r-- | net/tipc/port.c | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 42221219275c..4de58dece9b2 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -516,9 +516,10 @@ struct publication *tipc_nametbl_insert_publ(u32 type, u32 lower, u32 upper, | |||
516 | { | 516 | { |
517 | struct name_seq *seq = nametbl_find_seq(type); | 517 | struct name_seq *seq = nametbl_find_seq(type); |
518 | 518 | ||
519 | if (lower > upper) { | 519 | if ((scope < TIPC_ZONE_SCOPE) || (scope > TIPC_NODE_SCOPE) || |
520 | warn("Failed to publish illegal {%u,%u,%u}\n", | 520 | (lower > upper)) { |
521 | type, lower, upper); | 521 | dbg("Failed to publish illegal {%u,%u,%u} with scope %u\n", |
522 | type, lower, upper, scope); | ||
522 | return NULL; | 523 | return NULL; |
523 | } | 524 | } |
524 | 525 | ||
diff --git a/net/tipc/port.c b/net/tipc/port.c index 4aede40e592f..e6841706967c 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -992,10 +992,6 @@ int tipc_publish(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) | |||
992 | 992 | ||
993 | if (p_ptr->connected) | 993 | if (p_ptr->connected) |
994 | goto exit; | 994 | goto exit; |
995 | if (seq->lower > seq->upper) | ||
996 | goto exit; | ||
997 | if ((scope < TIPC_ZONE_SCOPE) || (scope > TIPC_NODE_SCOPE)) | ||
998 | goto exit; | ||
999 | key = ref + p_ptr->pub_count + 1; | 995 | key = ref + p_ptr->pub_count + 1; |
1000 | if (key == ref) { | 996 | if (key == ref) { |
1001 | res = -EADDRINUSE; | 997 | res = -EADDRINUSE; |