tipc: fix cancellation of topology subscriptions
Subsystems (3)
PATCH v2 1/1 tipc: fix cancellation of topology subscriptions
From: Erik Hugne <[email protected]>
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.
---
v2: clear bit in a more sensible way.. (comment from davem)
--- net/tipc/topsrv.c | 1 + 1 file changed, 1 insertion(+)
net/tipc/topsrv.c +1 -0
@@ -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 ; }
Signature · 1 line
2.1.4
David Miller
maintainerFrom: Jon Maloy <[email protected]>
Date: Thu, 21 Mar 2019 09:11:59 +0100
Quoted 7 lines
From: Erik Hugne <[email protected]>
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.
Quoted 6 lines
Fixes 8985ecc7c1e0 ("tipc: simplify endianness handling in topology subscriber")Signed-off-by Erik Hugne <[email protected]>Signed-off-by Jon Maloy <[email protected]>---
v2: clear bit in a more sensible way.. (comment from davem)
Applied and queued up for -stable.
Thanks for following up.