diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-05-23 13:57:25 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-06-24 16:18:15 -0400 |
commit | 76d12527f74ad1b42b068252fdd2056c8ae48a99 (patch) | |
tree | 3aa529ef9d83f7e28ea03c4912d73b5a8b3ce453 /net/tipc/port.c | |
parent | acc631bf6f597b36f3f014e12e69c710da610027 (diff) |
tipc: Add sanity check to detect rejection of non-payload messages
Introduces an internal sanity check to ensure that the only undeliverable
messages TIPC attempts to return to their origin are application payload
messages.
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index 3946b5b10c74..756e64cbff96 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -367,6 +367,12 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err) | |||
367 | imp++; | 367 | imp++; |
368 | 368 | ||
369 | /* discard rejected message if it shouldn't be returned to sender */ | 369 | /* discard rejected message if it shouldn't be returned to sender */ |
370 | |||
371 | if (WARN(!msg_isdata(msg), | ||
372 | "attempt to reject message with user=%u", msg_user(msg))) { | ||
373 | dump_stack(); | ||
374 | goto exit; | ||
375 | } | ||
370 | if (msg_errcode(msg) || msg_dest_droppable(msg)) | 376 | if (msg_errcode(msg) || msg_dest_droppable(msg)) |
371 | goto exit; | 377 | goto exit; |
372 | 378 | ||