diff options
author | David Howells <dhowells@redhat.com> | 2016-09-02 22:39:45 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-04 21:41:39 +0100 |
commit | 5f2d9c44389e7cd9fe192570f6f20199bc861eb8 (patch) | |
tree | 1339480e8cf3b2efaa3f1543e7504e3eb0602408 /include/rxrpc | |
parent | af338a9ea60acc6337fe9fcdcf664aec2520e541 (diff) | |
download | op-kernel-dev-5f2d9c44389e7cd9fe192570f6f20199bc861eb8.zip op-kernel-dev-5f2d9c44389e7cd9fe192570f6f20199bc861eb8.tar.gz |
rxrpc: Randomise epoch and starting client conn ID values
Create a random epoch value rather than a time-based one on startup and set
the top bit to indicate that this is the case.
Also create a random starting client connection ID value. This will be
incremented from here as new client connections are created.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/rxrpc')
-rw-r--r-- | include/rxrpc/packet.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h index b201744..3c6128e 100644 --- a/include/rxrpc/packet.h +++ b/include/rxrpc/packet.h @@ -24,6 +24,7 @@ typedef __be32 rxrpc_serial_net_t; /* on-the-wire Rx message serial number */ */ struct rxrpc_wire_header { __be32 epoch; /* client boot timestamp */ +#define RXRPC_RANDOM_EPOCH 0x80000000 /* Random if set, date-based if not */ __be32 cid; /* connection and channel ID */ #define RXRPC_MAXCALLS 4 /* max active calls per conn */ |