Skip to content

Commit 59a361b

Browse files
Jon Paul Maloydavem330
authored andcommitted
tipc: avoid inheriting msg_non_seq flag when message is returned
In the function msg_reverse(), we reverse the header while trying to reuse the original buffer whenever possible. Those rejected/returned messages are always transmitted as unicast, but the msg_non_seq field is not explicitly set to zero as it should be. We have seen cases where multicast senders set the message type to "NOT dest_droppable", meaning that a multicast message shorter than one MTU will be returned, e.g., during receive buffer overflow, by reusing the original buffer. This has the effect that even the 'msg_non_seq' field is inadvertently inherited by the rejected message, although it is now sent as a unicast message. This again leads the receiving unicast link endpoint to steer the packet toward the broadcast link receive function, where it is dropped. The affected unicast link is thereafter (after 100 failed retransmissions) declared 'stale' and reset. We fix this by unconditionally setting the 'msg_non_seq' flag to zero for all rejected/returned messages. Reported-by: Canh Duc Luu <canh.d.luu@dektech.com.au> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent fed5f57 commit 59a361b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/tipc/msg.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ bool tipc_msg_reverse(u32 own_node, struct sk_buff **skb, int err)
513513

514514
/* Now reverse the concerned fields */
515515
msg_set_errcode(hdr, err);
516+
msg_set_non_seq(hdr, 0);
516517
msg_set_origport(hdr, msg_destport(&ohdr));
517518
msg_set_destport(hdr, msg_origport(&ohdr));
518519
msg_set_destnode(hdr, msg_prevnode(&ohdr));

0 commit comments

Comments
 (0)