aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-03-14 18:55:32 +0100
committerToni Uhlig <matzeton@googlemail.com>2020-03-14 18:55:32 +0100
commit8823555e48209b397b0def62219f9b25243bde23 (patch)
tree1d2fe822764aa636988ffa734c30f306545345db
parent1e8037d84d01ef605b667f8db42f3c95831d7920 (diff)
sequence number timeout table uses now correct time_t for timestamps
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--src/ptunnel.c4
-rw-r--r--src/ptunnel.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ptunnel.c b/src/ptunnel.c
index 8462758..5feb34a 100644
--- a/src/ptunnel.c
+++ b/src/ptunnel.c
@@ -105,7 +105,7 @@ int num_threads = 0;
/** Current tunnel count */
uint32_t num_tunnels = 0;
/** Table indicating when a connection ID is allowable (used by proxy) */
-uint32_t *seq_expiry_tbl = NULL;
+time_t *seq_expiry_tbl = NULL;
/* Some buffer constants */
const int icmp_receive_buf_len = kDefault_buf_size + kIP_header_size +
@@ -181,7 +181,7 @@ int main(int argc, char *argv[]) {
/* The seq_expiry_tbl is used to prevent the remote ends from prematurely
* re-using a sequence number.
*/
- seq_expiry_tbl = (uint32_t *) calloc(65536, sizeof(uint32_t));
+ seq_expiry_tbl = (time_t *) calloc(65536, sizeof(time_t));
/* Parse options */
if (parse_options(argc, argv))
diff --git a/src/ptunnel.h b/src/ptunnel.h
index 2fce25d..2fda8bc 100644
--- a/src/ptunnel.h
+++ b/src/ptunnel.h
@@ -92,7 +92,7 @@ extern pthread_mutex_t chain_lock;
extern uint32_t num_tunnels;
extern const int icmp_receive_buf_len;
extern proxy_desc_t *chain;
-extern uint32_t *seq_expiry_tbl;
+extern time_t *seq_expiry_tbl;
extern const char *state_name[kNum_proto_types];
/* pt_thread_info_t: A simple (very simple, in fact) structure that allows us