diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-01-12 19:10:53 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-01-12 19:10:53 +0000 |
commit | b873a39ae3f72d3c6c9c1e2078293bafaae8db07 (patch) | |
tree | ba3ee81e29df494623ea675f5060d95b2b6d770b /sys/arch | |
parent | 1767e3d90497ecf40253031c84cb1dbcd101da70 (diff) |
As recommended by the Sun Virtual IO specification, use tick() to generate
session ID instead of arc4random().
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/vnet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c index f708fb1ef0d..0ea3749f05a 100644 --- a/sys/arch/sparc64/dev/vnet.c +++ b/sys/arch/sparc64/dev/vnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnet.c,v 1.8 2009/01/11 15:06:52 kettenis Exp $ */ +/* $OpenBSD: vnet.c,v 1.9 2009/01/12 19:10:52 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -43,8 +43,6 @@ #include <uvm/uvm.h> -#include <dev/rndvar.h> - #include <sparc64/dev/cbusvar.h> #include <sparc64/dev/ldcvar.h> #include <sparc64/dev/viovar.h> @@ -483,7 +481,7 @@ vnet_rx_vio_ver_info(struct vnet_softc *sc, struct vio_msg_tag *tag) } /* Allocate new session ID. */ - sc->sc_local_sid = arc4random(); + sc->sc_local_sid = tick(); vi->tag.stype = VIO_SUBTYPE_ACK; vi->tag.sid = sc->sc_local_sid; |