diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-05-04 15:09:55 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-05-04 15:09:55 +0200 |
| commit | 222bd168e7be37a662ed8281db1a9b32f0cca7d2 (patch) | |
| tree | aaafa88c8c79baaf69fbaad5b08b7d00482db6f5 /src/routing.c | |
| parent | ce69e3e5bf0c6188fa7bc70021b7dde0e7752c9a (diff) | |
Add some check for expiry time
Diffstat (limited to 'src/routing.c')
| -rw-r--r-- | src/routing.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/routing.c b/src/routing.c index 7c10e16..30f0deb 100644 --- a/src/routing.c +++ b/src/routing.c @@ -73,7 +73,12 @@ void routing_update_metrics() { prom_gauge_set(routing_table_occupied, filled, (const char*[]){buf}); } - dbg("Update metrics!!"); + + time_t reasonable = time(NULL) + 120; + for(size_t i = 0; i < RT_SIZE; i++) { + if(pTable->table[i].set) continue; + if(reasonable < pTable->table[i].expire) dbg("%d will expire quite far into the future after now? (%ld < %ld)", i, reasonable, pTable->table[i].expire); + } } void routing_flush() { |
