diff options
author | David Howells <dhowells@redhat.com> | 2016-03-04 15:56:06 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-03-04 15:56:06 +0000 |
commit | 351c1e648623b742fe1687636117306adc8b561c (patch) | |
tree | 483d1630ed4dc47d80ed77bcd266eac81dea1ce2 /include | |
parent | ee6fe085a992d40d2b5d3e7e2b9e0eec1cdacaac (diff) |
rxrpc: Be more selective about the types of received packets we accept
Currently, received RxRPC packets outside the range 1-13 are rejected.
There are, however, holes in the range that should also be rejected - plus
at least one type we don't yet support - so reject these also.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rxrpc/packet.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h index de1e67988ada..9ebab3a8cf0a 100644 --- a/include/rxrpc/packet.h +++ b/include/rxrpc/packet.h @@ -70,6 +70,17 @@ struct rxrpc_wire_header { extern const char *rxrpc_pkts[]; +#define RXRPC_SUPPORTED_PACKET_TYPES ( \ + (1 << RXRPC_PACKET_TYPE_DATA) | \ + (1 << RXRPC_PACKET_TYPE_ACK) | \ + (1 << RXRPC_PACKET_TYPE_BUSY) | \ + (1 << RXRPC_PACKET_TYPE_ABORT) | \ + (1 << RXRPC_PACKET_TYPE_ACKALL) | \ + (1 << RXRPC_PACKET_TYPE_CHALLENGE) | \ + (1 << RXRPC_PACKET_TYPE_RESPONSE) | \ + /*(1 << RXRPC_PACKET_TYPE_DEBUG) | */ \ + (1 << RXRPC_PACKET_TYPE_VERSION)) + /*****************************************************************************/ /* * jumbo packet secondary header |