mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 10:38:05 +00:00
ripd: Use a sequence number instead of time
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
c392d9f487
commit
1568e88a8e
@ -996,6 +996,7 @@ static size_t rip_auth_md5_ah_write(struct stream *s, struct rip_interface *ri,
|
|||||||
struct key *key)
|
struct key *key)
|
||||||
{
|
{
|
||||||
size_t doff = 0;
|
size_t doff = 0;
|
||||||
|
static uint32_t seq = 0;
|
||||||
|
|
||||||
assert(s && ri && ri->auth_type == RIP_AUTH_MD5);
|
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
|
/* RFC2080: The value used in the sequence number is
|
||||||
arbitrary, but two suggestions are the time of the
|
arbitrary, but two suggestions are the time of the
|
||||||
message's creation or a simple message counter. */
|
message's creation or a simple message counter. */
|
||||||
stream_putl(s, time(NULL));
|
stream_putl(s, ++seq);
|
||||||
|
|
||||||
/* Reserved field must be zero. */
|
/* Reserved field must be zero. */
|
||||||
stream_putl(s, 0);
|
stream_putl(s, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user