diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2016-02-02 10:52:13 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-06 09:41:58 +0100 |
commit | cb01c7c8701a35866479753fe78d04bd9826dd1b (patch) | |
tree | 6ec13eff7ab2c7b33e328094dbb0f49b064769ab /virt/Makefile | |
parent | tipc: fix connection abort during subscription cancellation (diff) | |
download | linux-cb01c7c8701a35866479753fe78d04bd9826dd1b.tar.xz linux-cb01c7c8701a35866479753fe78d04bd9826dd1b.zip |
tipc: fix connection abort when receiving invalid cancel request
Until now, the subscribers endianness for a subscription
create/cancel request is determined as:
swap = !(s->filter & (TIPC_SUB_PORTS | TIPC_SUB_SERVICE))
The checks are performed only for port/service subscriptions.
The swap calculation is incorrect if the filter in the subscription
cancellation request is set to TIPC_SUB_CANCEL (it's a malformed
cancel request, as the corresponding subscription create filter
is missing).
Thus, the check if the request is for cancellation fails and the
request is treated as a subscription create request. The
subscription creation fails as the request is illegal, which
terminates this connection.
In this commit we determine the endianness by including
TIPC_SUB_CANCEL, which will set swap correctly and the
request is processed as a cancellation request.
Acked-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'virt/Makefile')
0 files changed, 0 insertions, 0 deletions