diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-06-20 18:03:06 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 13:53:42 +0100 |
commit | b32d557a6eca10c1e1dc2f2ab83e201f53d134b4 (patch) | |
tree | 2cb47dd9aca4d52ebafce84826da2903e43ca6b2 /proto/ospf/packet.c | |
parent | ee528fbd5dc482ceece52832d4a8ea5a08251bfa (diff) |
OSPF: Update to new timers
Note that recurrent timers are currently limited to ~1 hour.
Diffstat (limited to 'proto/ospf/packet.c')
-rw-r--r-- | proto/ospf/packet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index 7f9f3b39..38d7a75f 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -77,16 +77,16 @@ ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt, uint *plen) reboot when system does not have independent RTC? */ if (!ifa->csn) { - ifa->csn = (u32) now; - ifa->csn_use = now; + ifa->csn = (u32) (current_real_time() TO_S); + ifa->csn_use = current_time(); } /* We must have sufficient delay between sending a packet and increasing CSN to prevent reordering of packets (in a network) with different CSNs */ - if ((now - ifa->csn_use) > 1) + if ((current_time() - ifa->csn_use) > 1 S) ifa->csn++; - ifa->csn_use = now; + ifa->csn_use = current_time(); uint auth_len = mac_type_length(pass->alg); byte *auth_tail = ((byte *) pkt + *plen); |