From 5ff4d17ce24ed4bdd35f1abe0463e4831b5e631e Mon Sep 17 00:00:00 2001 From: Esben Norby Date: Thu, 31 Mar 2005 20:13:23 +0000 Subject: Better crypt sequence number initialization. Suggested by henning@ ok henning@ --- usr.sbin/ospfd/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ospfd/interface.c b/usr.sbin/ospfd/interface.c index e5a2d7c4d5c..19fa75d8b8f 100644 --- a/usr.sbin/ospfd/interface.c +++ b/usr.sbin/ospfd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.14 2005/03/31 19:32:10 norby Exp $ */ +/* $OpenBSD: interface.c,v 1.15 2005/03/31 20:13:22 norby Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -167,7 +167,7 @@ if_new(struct kif *kif) TAILQ_INIT(&iface->ls_ack_list); md_list_init(iface); - iface->crypt_seq_num = arc4random(); + iface->crypt_seq_num = arc4random() & 0x0fffffff; evtimer_set(&iface->lsack_tx_timer, ls_ack_tx_timer, iface); -- cgit v1.2.3