tipc: Improve handling of invalid link tolerance values
authorAllan Stephens <Allan.Stephens@windriver.com>
Tue, 18 Jan 2011 18:24:55 +0000 (13:24 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 23 Feb 2011 23:05:09 +0000 (18:05 -0500)
commit5413b4c6c07b659e52c84a4e40d897b32b89834f
treea0f108cc7396f0a715ed36cd1d6b2636c52798b1
parent3f8dd9446e66f2a982ddcff38e4705cfe93eeec6
tipc: Improve handling of invalid link tolerance values

Enhances TIPC link code to ignore an invalid link tolerance value
contained in an incoming LINK_PROTOCOL message, rather than
processing the value and potentially causing a divide-by-zero error.

Also add a compile-time check that catches attempts to redefine
TIPC's minimum link tolerance value in a manner that might result
in the same divide-by-zero error at run-time.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
include/linux/tipc_config.h
net/tipc/link.c