[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1553075943-15985-1-git-send-email-jon.maloy@ericsson.com>
Date: Wed, 20 Mar 2019 10:59:03 +0100
From: Jon Maloy <jon.maloy@...csson.com>
To: <davem@...emloft.net>, <netdev@...r.kernel.org>
CC: <gordan.mihaljevic@...tech.com.au>, <tung.q.nguyen@...tech.com.au>,
<hoang.h.le@...tech.com.au>, <jon.maloy@...csson.com>,
<canh.d.luu@...tech.com.au>, <ying.xue@...driver.com>,
<tipc-discussion@...ts.sourceforge.net>
Subject: [net 1/1] tipc: fix cancellation of topology subscriptions
From: Erik Hugne <erik.hugne@...il.com>
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@...il.com>
Signed-off-by: Jon Maloy <jon.maloy@...csson.com>
---
net/tipc/topsrv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c
index 4a708a4..b05a89a 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;
}
--
2.1.4
Powered by blists - more mailing lists