diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2023-05-31 00:41:39 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2023-05-31 00:47:28 +0200 |
commit | 2882096fad0b98c051551574195c6d062d8b9624 (patch) | |
tree | e6065c263f566c49b2a16924ef0a36b37f5c2e3f /ospf6d | |
parent | Merge pull request #13631 from donaldsharp/fix_some_ping_issues (diff) | |
download | frr-2882096fad0b98c051551574195c6d062d8b9624.tar.xz frr-2882096fad0b98c051551574195c6d062d8b9624.zip |
ospfd, ospf6d: fix time_t truncation
Change timestamp parameter from int to time_t to avoid truncation.
Found by Coverity Scan (CID 1563226 and 1563222)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_gr.c | 3 | ||||
-rw-r--r-- | ospf6d/ospf6_gr.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c index 3d5d4d259..ecaaa038a 100644 --- a/ospf6d/ospf6_gr.c +++ b/ospf6d/ospf6_gr.c @@ -239,7 +239,8 @@ static void ospf6_gr_restart_exit(struct ospf6 *ospf6, const char *reason) /* Enter the Graceful Restart mode. */ void ospf6_gr_restart_enter(struct ospf6 *ospf6, - enum ospf6_gr_restart_reason reason, int timestamp) + enum ospf6_gr_restart_reason reason, + time_t timestamp) { unsigned long remaining_time; diff --git a/ospf6d/ospf6_gr.h b/ospf6d/ospf6_gr.h index e6566a609..84ef3aeb8 100644 --- a/ospf6d/ospf6_gr.h +++ b/ospf6d/ospf6_gr.h @@ -158,7 +158,7 @@ extern int config_write_ospf6_debug_gr_helper(struct vty *vty); extern void ospf6_gr_iface_send_grace_lsa(struct event *thread); extern void ospf6_gr_restart_enter(struct ospf6 *ospf6, enum ospf6_gr_restart_reason reason, - int timestamp); + time_t timestamp); extern void ospf6_gr_check_lsdb_consistency(struct ospf6 *ospf, struct ospf6_area *area); extern void ospf6_gr_nvm_read(struct ospf6 *ospf); |