From: Allan Stephens Date: Thu, 7 Apr 2011 13:54:43 +0000 (-0400) Subject: tipc: Enhance filtering of out-dated link reset messages X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=641c218d120b03bdea4f658ab44930587cff9158;p=linux-beck.git tipc: Enhance filtering of out-dated link reset messages 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 Signed-off-by: Paul Gortmaker --- diff --git a/net/tipc/link.c b/net/tipc/link.c index e0bf6d5f1668..b43beea54108 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -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: