Skip to content

Commit

Permalink
tipc: Enhance filtering of out-dated link reset messages
Browse files Browse the repository at this point in the history
Ensure TIPC ignores an out-dated link reset message whose session
number predates the current session number. (Previously, TIPC only
ignored an out-date reset message whose session number was equal
to the current link session number.)

Out-dated link reset messages should not occur under normal circumstances;
however, they can be generated if a link endpoint is unable to send a
link reset message right away and queues it for later delivery, but the
queued message is not sent until after the link is established.

Thanks to Laser [gotolaser@gmail.com] for diagnosing the problem and
contributing a prototype patch.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Sep 1, 2011
1 parent f882cb7 commit 641c218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,8 +2045,8 @@ static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf)
case RESET_MSG:
if (!link_working_unknown(l_ptr) &&
(l_ptr->peer_session != INVALID_SESSION)) {
if (msg_session(msg) == l_ptr->peer_session)
break; /* duplicate: ignore */
if (less_eq(msg_session(msg), l_ptr->peer_session))
break; /* duplicate or old reset: ignore */
}
/* fall thru' */
case ACTIVATE_MSG:
Expand Down

0 comments on commit 641c218

Please sign in to comment.