Commit f464100f authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller

selftests/net: fix warnings in TFO key rotation selftest

One warning each on signedness, unused variable and return type.

Fixes: 10fbcdd1 ("selftests/net: add TFO key rotation selftest")
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e6a4817
......@@ -51,7 +51,7 @@ static const int PORT = 8891;
static void get_keys(int fd, uint32_t *keys)
{
char buf[128];
int len = KEY_LENGTH * 2;
socklen_t len = KEY_LENGTH * 2;
if (do_sockopt) {
if (getsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, &len))
......@@ -210,14 +210,13 @@ static bool is_listen_fd(int fd)
return false;
}
static int rotate_key(int fd)
static void rotate_key(int fd)
{
static int iter;
static uint32_t new_key[4];
uint32_t keys[8];
uint32_t tmp_key[4];
int i;
int len = KEY_LENGTH * 2;
if (iter < N_LISTEN) {
/* first set new key as backups */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment