diff options
author | Erik Hugne <[email protected]> | 2019-03-21 09:11:59 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-03-21 09:09:04 -0700 |
commit | 33872d79f5d1cbedaaab79669cc38f16097a9450 (patch) | |
tree | cf20ae35cad162b95da2e85929ce7fb8af71fe52 | |
parent | 64447506f152cf0f88a0fc23140ca1c5f7ff34a8 (diff) |
tipc: fix cancellation of topology subscriptions
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 <[email protected]>
Signed-off-by: Jon Maloy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | net/tipc/topsrv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index 4a708a4e8583..b45932d78004 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -363,6 +363,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; } |