]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: don't send FIN message from connectionless socket
authorJon Paul Maloy <jon.maloy@ericsson.com>
Thu, 22 Dec 2016 12:22:29 +0000 (07:22 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Dec 2016 22:53:47 +0000 (17:53 -0500)
commitbfc7a07c1b69a2fa0e7a79fa336462c0c34b00b4
tree2889cdc6f954142ec0f054d435cf2dd5c2250b3d
parentd0ce95e07b0d548f81b5abf92844e09e7542b117
tipc: don't send FIN message from connectionless socket

In commit 7198c0705f81 ("tipc: remove SS_DISCONNECTING state") the
check for socket type is in the wrong place, causing a closing socket
to always send out a FIN message even when the socket was never
connected. This is normally harmless, since the destination node for
such messages most often is zero, and the message will be dropped, but
it is still a wrong and confusing behavior.

We fix this in this commit.

Reviewed-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c