diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2012-04-26 17:57:17 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-04-26 18:15:48 -0400 |
commit | 8f1778969359a71f398c9ac6d3a9a3e61439b466 (patch) | |
tree | 09a5003c9b116cdde9f12acec508067ee8215333 /net/tipc/port.c | |
parent | f7fb9d20ade55e538efe91477014b6b367ecd802 (diff) |
tipc: Enhance error checking of published names
Consolidates validation of scope and name sequence range values into
a single routine where it applies both to local name publications
and to name publications issued by other nodes in the network. This
change means that the scope value for non-local publications is now
validated and the name sequence range for local publications is now
validated only once. Additionally, a publication attempt that fails
validation now creates an entry in the system log file only if debugging
capabilities have been enabled; this prevents the system log from being
cluttered up with messages caused by a defective application or network
node.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r-- | net/tipc/port.c | 4 |
1 files changed, 0 insertions, 4 deletions
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; |