summaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@gmail.com>2019-03-21 11:11:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-03 07:26:18 +0300
commit52a7505c91a19d3a2a1047225701a57728a83875 (patch)
treec8e6b5e726d6d8eed0fc16fd00783b7d92d65d7f /net/tipc
parent1be6c0c737e402958283a0941b92c2204bb96a04 (diff)
downloadlinux-52a7505c91a19d3a2a1047225701a57728a83875.tar.xz
tipc: fix cancellation of topology subscriptions
[ Upstream commit 33872d79f5d1cbedaaab79669cc38f16097a9450 ] When cancelling a subscription, we have to clear the cancel bit in the request before iterating over any established subscriptions with memcmp. Otherwise no subscription will ever be found, and it will not be possible to explicitly unsubscribe individual subscriptions. Fixes: 8985ecc7c1e0 ("tipc: simplify endianness handling in topology subscriber") Signed-off-by: Erik Hugne <erik.hugne@gmail.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/topsrv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c
index d65eed88c495..2301b09df234 100644
--- a/net/tipc/topsrv.c
+++ b/net/tipc/topsrv.c
@@ -371,6 +371,7 @@ static int tipc_conn_rcv_sub(struct tipc_topsrv *srv,
struct tipc_subscription *sub;
if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) {
+ s->filter &= __constant_ntohl(~TIPC_SUB_CANCEL);
tipc_conn_delete_sub(con, s);
return 0;
}