]> Git Repo - linux.git/commitdiff
tipc: fix cancellation of topology subscriptions
authorErik Hugne <[email protected]>
Thu, 21 Mar 2019 08:11:59 +0000 (09:11 +0100)
committerDavid S. Miller <[email protected]>
Thu, 21 Mar 2019 16:09:04 +0000 (09:09 -0700)
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]>
net/tipc/topsrv.c

index 4a708a4e8583b5db2022b80e80529e25e787e7bb..b45932d780040a35c099a8ead80ccea40e0910b9 100644 (file)
@@ -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;
        }
This page took 0.057048 seconds and 4 git commands to generate.