Skip to content

Commit 01e3e63

Browse files
Parthasarathy Bhuvaragangregkh
authored andcommitted
tipc: use only positive error codes in messages
[ Upstream commit aad06212d36cf34859428a0a279e5c14ee5c9e26 ] In commit e3a7756 ("tipc: split up function tipc_msg_eval()"), we have updated the function tipc_msg_lookup_dest() to set the error codes to negative values at destination lookup failures. Thus when the function sets the error code to -TIPC_ERR_NO_NAME, its inserted into the 4 bit error field of the message header as 0xf instead of TIPC_ERR_NO_NAME (1). The value 0xf is an unknown error code. In this commit, we set only positive error code. Fixes: e3a7756 ("tipc: split up function tipc_msg_eval()") Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6856997 commit 01e3e63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/tipc/msg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)
541541
return false;
542542
if (msg_errcode(msg))
543543
return false;
544-
*err = -TIPC_ERR_NO_NAME;
544+
*err = TIPC_ERR_NO_NAME;
545545
if (skb_linearize(skb))
546546
return false;
547547
msg = buf_msg(skb);

0 commit comments

Comments
 (0)