aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r--net/tipc/msg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 7bfc4422bf2c..6ec958401f78 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -348,13 +348,17 @@ bool tipc_msg_reverse(struct sk_buff *buf, u32 *dnode, int err)
348 struct tipc_msg ohdr; 348 struct tipc_msg ohdr;
349 uint rdsz = min_t(uint, msg_data_sz(msg), MAX_FORWARD_SIZE); 349 uint rdsz = min_t(uint, msg_data_sz(msg), MAX_FORWARD_SIZE);
350 350
351 if (skb_linearize(buf) || !msg_isdata(msg)) 351 if (skb_linearize(buf))
352 goto exit;
353 if (msg_dest_droppable(msg))
352 goto exit; 354 goto exit;
353 if (msg_dest_droppable(msg) || msg_errcode(msg)) 355 if (msg_errcode(msg))
354 goto exit; 356 goto exit;
355 357
356 memcpy(&ohdr, msg, msg_hdr_sz(msg)); 358 memcpy(&ohdr, msg, msg_hdr_sz(msg));
357 msg_set_importance(msg, min_t(uint, ++imp, TIPC_CRITICAL_IMPORTANCE)); 359 imp = min_t(uint, imp + 1, TIPC_CRITICAL_IMPORTANCE);
360 if (msg_isdata(msg))
361 msg_set_importance(msg, imp);
358 msg_set_errcode(msg, err); 362 msg_set_errcode(msg, err);
359 msg_set_origport(msg, msg_destport(&ohdr)); 363 msg_set_origport(msg, msg_destport(&ohdr));
360 msg_set_destport(msg, msg_origport(&ohdr)); 364 msg_set_destport(msg, msg_origport(&ohdr));