Commit 76d12527 authored by Allan Stephens's avatar Allan Stephens Committed by Paul Gortmaker

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: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent acc631bf
......@@ -367,6 +367,12 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err)
imp++;
/* discard rejected message if it shouldn't be returned to sender */
if (WARN(!msg_isdata(msg),
"attempt to reject message with user=%u", msg_user(msg))) {
dump_stack();
goto exit;
}
if (msg_errcode(msg) || msg_dest_droppable(msg))
goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment