]>
Commit | Line | Data |
---|---|---|
38568109 GKH |
1 | From foo@baz Thu Mar 28 21:54:17 CET 2019 |
2 | From: Erik Hugne <erik.hugne@gmail.com> | |
3 | Date: Thu, 21 Mar 2019 09:11:59 +0100 | |
4 | Subject: tipc: fix cancellation of topology subscriptions | |
5 | ||
6 | From: Erik Hugne <erik.hugne@gmail.com> | |
7 | ||
8 | [ Upstream commit 33872d79f5d1cbedaaab79669cc38f16097a9450 ] | |
9 | ||
10 | When cancelling a subscription, we have to clear the cancel bit in the | |
11 | request before iterating over any established subscriptions with memcmp. | |
12 | Otherwise no subscription will ever be found, and it will not be | |
13 | possible to explicitly unsubscribe individual subscriptions. | |
14 | ||
15 | Fixes: 8985ecc7c1e0 ("tipc: simplify endianness handling in topology subscriber") | |
16 | Signed-off-by: Erik Hugne <erik.hugne@gmail.com> | |
17 | Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> | |
18 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | --- | |
21 | net/tipc/topsrv.c | 1 + | |
22 | 1 file changed, 1 insertion(+) | |
23 | ||
24 | --- a/net/tipc/topsrv.c | |
25 | +++ b/net/tipc/topsrv.c | |
26 | @@ -371,6 +371,7 @@ static int tipc_conn_rcv_sub(struct tipc | |
27 | struct tipc_subscription *sub; | |
28 | ||
29 | if (tipc_sub_read(s, filter) & TIPC_SUB_CANCEL) { | |
30 | + s->filter &= __constant_ntohl(~TIPC_SUB_CANCEL); | |
31 | tipc_conn_delete_sub(con, s); | |
32 | return 0; | |
33 | } |