Skip to content

Commit

Permalink
tipc: reassembly failures should cause link reset
Browse files Browse the repository at this point in the history
If appending a received fragment to the pending fragment chain
in a unicast link fails, the current code tries to force a retransmission
of the fragment by decrementing the 'next received sequence number'
field in the link. This is done under the assumption that the failure
is caused by an out-of-memory situation, an assumption that does
not hold true after the previous patch in this series.

A failure to append a fragment can now only be caused by a protocol
violation by the sending peer, and it must hence be assumed that it
is either malicious or buggy.  Either way, the correct behavior is now
to reset the link instead of trying to revert its sequence number.
So, this is what we do in this commit.

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>
  • Loading branch information
Erik Hugne authored and davem330 committed Nov 7, 2013
1 parent 40ba3cd commit a715b49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr)
goto deliver;
}
if (ret == LINK_REASM_ERROR)
l_ptr->next_in_no--;
tipc_link_reset(l_ptr);
tipc_node_unlock(n_ptr);
continue;
case CHANGEOVER_PROTOCOL:
Expand Down

0 comments on commit a715b49

Please sign in to comment.