diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2017-09-29 04:02:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-30 23:03:35 -0400 |
commit | aad06212d36cf34859428a0a279e5c14ee5c9e26 (patch) | |
tree | 648b7078ed5c0881ba64b2299418daeccdd30c08 /net/tipc/msg.c | |
parent | 5a59a3a0ef0e546626a762d49dc06feaa204bab3 (diff) |
tipc: use only positive error codes in messages
In commit e3a77561e7d32 ("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: e3a77561e7d32 ("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>
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r-- | net/tipc/msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 6ef379f004ac..121e59a1d0e7 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c | |||
@@ -551,7 +551,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err) | |||
551 | return false; | 551 | return false; |
552 | if (msg_errcode(msg)) | 552 | if (msg_errcode(msg)) |
553 | return false; | 553 | return false; |
554 | *err = -TIPC_ERR_NO_NAME; | 554 | *err = TIPC_ERR_NO_NAME; |
555 | if (skb_linearize(skb)) | 555 | if (skb_linearize(skb)) |
556 | return false; | 556 | return false; |
557 | msg = buf_msg(skb); | 557 | msg = buf_msg(skb); |