aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2013-11-06 03:28:05 -0500
committerDavid S. Miller <davem@davemloft.net>2013-11-07 18:30:11 -0500
commit528f6f4bf372511ebf6004eed822de8f749b5930 (patch)
tree3db1786d51ec6f55d468f1a0e9028b61119ee4ba /net/tipc
parentb0db7b0c21a014d01be1018db68e78ebf7d4f0d7 (diff)
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>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c6
-rw-r--r--net/tipc/link.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 716de1ac6cb5..766a6eb4a88f 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -487,11 +487,13 @@ receive:
487 spin_lock_bh(&bc_lock); 487 spin_lock_bh(&bc_lock);
488 bclink_accept_pkt(node, seqno); 488 bclink_accept_pkt(node, seqno);
489 bcl->stats.recv_fragments++; 489 bcl->stats.recv_fragments++;
490 if (ret > 0) 490 if (ret > 0) {
491 bcl->stats.recv_fragmented++; 491 bcl->stats.recv_fragmented++;
492 spin_unlock_bh(&bc_lock);
493 goto receive;
494 }
492 spin_unlock_bh(&bc_lock); 495 spin_unlock_bh(&bc_lock);
493 tipc_node_unlock(node); 496 tipc_node_unlock(node);
494 tipc_net_route_msg(buf);
495 } else if (msg_user(msg) == NAME_DISTRIBUTOR) { 497 } else if (msg_user(msg) == NAME_DISTRIBUTOR) {
496 spin_lock_bh(&bc_lock); 498 spin_lock_bh(&bc_lock);
497 bclink_accept_pkt(node, seqno); 499 bclink_accept_pkt(node, seqno);
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 54163f91b8ae..ada8cadf5af8 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1657,7 +1657,8 @@ deliver:
1657 } 1657 }
1658 if (ret == -1) 1658 if (ret == -1)
1659 l_ptr->next_in_no--; 1659 l_ptr->next_in_no--;
1660 break; 1660 tipc_node_unlock(n_ptr);
1661 continue;
1661 case CHANGEOVER_PROTOCOL: 1662 case CHANGEOVER_PROTOCOL:
1662 type = msg_type(msg); 1663 type = msg_type(msg);
1663 if (link_recv_changeover_msg(&l_ptr, &buf)) { 1664 if (link_recv_changeover_msg(&l_ptr, &buf)) {