summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-08-18 01:05:33 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-08-24 14:30:42 +0200
commit1568e88a8e9b89b1cc7eacb90b9c8c598e4e2e54 (patch)
tree930ef98baad1de4a3452935407137f8492ba0267
parentbabeld: Remove return value for gettime() (diff)
downloadfrr-1568e88a8e9b89b1cc7eacb90b9c8c598e4e2e54.tar.xz
frr-1568e88a8e9b89b1cc7eacb90b9c8c598e4e2e54.zip
ripd: Use a sequence number instead of time
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--ripd/ripd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 979818603..c3a9369a0 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -996,6 +996,7 @@ static size_t rip_auth_md5_ah_write(struct stream *s, struct rip_interface *ri,
struct key *key)
{
size_t doff = 0;
+ static uint32_t seq = 0;
assert(s && ri && ri->auth_type == RIP_AUTH_MD5);
@@ -1028,7 +1029,7 @@ static size_t rip_auth_md5_ah_write(struct stream *s, struct rip_interface *ri,
/* RFC2080: The value used in the sequence number is
arbitrary, but two suggestions are the time of the
message's creation or a simple message counter. */
- stream_putl(s, time(NULL));
+ stream_putl(s, ++seq);
/* Reserved field must be zero. */
stream_putl(s, 0);