]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
tipc: Initialize peer session field of newly created link endpoint
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 7 Apr 2011 13:43:27 +0000 (09:43 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 1 Sep 2011 15:16:35 +0000 (11:16 -0400)
Initializes the peer session number field of a newly created link
endpoint to an invalid value. This eliminates the remote possibility
that it will accidentally match the session number used by the peer
the first time the link is activated, and cause the link to ignore
a valid RESET message.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/link.c

index 4cb500b53cf1ca5258abce762ed0d47c9a6d649a..e0bf6d5f1668419ee72772dd4ce4a68839058cef 100644 (file)
@@ -341,6 +341,7 @@ struct link *tipc_link_create(struct tipc_node *n_ptr,
        memcpy(&l_ptr->media_addr, media_addr, sizeof(*media_addr));
        l_ptr->owner = n_ptr;
        l_ptr->checkpoint = 1;
+       l_ptr->peer_session = INVALID_SESSION;
        l_ptr->b_ptr = b_ptr;
        link_set_supervision_props(l_ptr, b_ptr->media->tolerance);
        l_ptr->state = RESET_UNKNOWN;