Skip to content

Commit 528f6f4

Browse files
Erik Hugnedavem330
authored andcommitted
tipc: don't reroute message fragments
When a message fragment is received in a broadcast or unicast link, the reception code will append the fragment payload to a big reassembly buffer through a call to the function tipc_recv_fragm(). However, after the return of that call, the logics goes on and passes the fragment buffer to the function tipc_net_route_msg(), which will simply drop it. This behavior is a remnant from the now obsolete multi-cluster functionality, and has no relevance in the current code base. Although currently harmless, this unnecessary call would be fatal after applying the next patch in this series, which introduces a completely new reassembly algorithm. So we change the code to eliminate the redundant call. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b0db7b0 commit 528f6f4

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎net/tipc/bcast.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,13 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)
487487
spin_lock_bh(&bc_lock);
488488
bclink_accept_pkt(node, seqno);
489489
bcl->stats.recv_fragments++;
490-
if (ret > 0)
490+
if (ret > 0) {
491491
bcl->stats.recv_fragmented++;
492+
spin_unlock_bh(&bc_lock);
493+
goto receive;
494+
}
492495
spin_unlock_bh(&bc_lock);
493496
tipc_node_unlock(node);
494-
tipc_net_route_msg(buf);
495497
} else if (msg_user(msg) == NAME_DISTRIBUTOR) {
496498
spin_lock_bh(&bc_lock);
497499
bclink_accept_pkt(node, seqno);

‎net/tipc/link.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,8 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr)
16571657
}
16581658
if (ret == -1)
16591659
l_ptr->next_in_no--;
1660-
break;
1660+
tipc_node_unlock(n_ptr);
1661+
continue;
16611662
case CHANGEOVER_PROTOCOL:
16621663
type = msg_type(msg);
16631664
if (link_recv_changeover_msg(&l_ptr, &buf)) {

0 commit comments

Comments
 (0)