Commit 528f6f4b authored by Erik Hugne's avatar Erik Hugne Committed by David S. Miller

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: default avatarErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b0db7b0c
...@@ -487,11 +487,13 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) ...@@ -487,11 +487,13 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)
spin_lock_bh(&bc_lock); spin_lock_bh(&bc_lock);
bclink_accept_pkt(node, seqno); bclink_accept_pkt(node, seqno);
bcl->stats.recv_fragments++; bcl->stats.recv_fragments++;
if (ret > 0) if (ret > 0) {
bcl->stats.recv_fragmented++; bcl->stats.recv_fragmented++;
spin_unlock_bh(&bc_lock);
goto receive;
}
spin_unlock_bh(&bc_lock); spin_unlock_bh(&bc_lock);
tipc_node_unlock(node); tipc_node_unlock(node);
tipc_net_route_msg(buf);
} else if (msg_user(msg) == NAME_DISTRIBUTOR) { } else if (msg_user(msg) == NAME_DISTRIBUTOR) {
spin_lock_bh(&bc_lock); spin_lock_bh(&bc_lock);
bclink_accept_pkt(node, seqno); bclink_accept_pkt(node, seqno);
......
...@@ -1657,7 +1657,8 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr) ...@@ -1657,7 +1657,8 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr)
} }
if (ret == -1) if (ret == -1)
l_ptr->next_in_no--; l_ptr->next_in_no--;
break; tipc_node_unlock(n_ptr);
continue;
case CHANGEOVER_PROTOCOL: case CHANGEOVER_PROTOCOL:
type = msg_type(msg); type = msg_type(msg);
if (link_recv_changeover_msg(&l_ptr, &buf)) { if (link_recv_changeover_msg(&l_ptr, &buf)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment