ubsec.c (115747) | ubsec.c (116924) |
---|---|
1/* $FreeBSD: head/sys/dev/ubsec/ubsec.c 115747 2003-06-02 23:32:03Z sam $ */ | 1/* $FreeBSD: head/sys/dev/ubsec/ubsec.c 116924 2003-06-27 20:07:10Z sam $ */ |
2/* $OpenBSD: ubsec.c,v 1.115 2002/09/24 18:33:26 jason Exp $ */ 3 4/* 5 * Copyright (c) 2000 Jason L. Wright (jason@thought.net) 6 * Copyright (c) 2000 Theo de Raadt (deraadt@openbsd.org) 7 * Copyright (c) 2001 Patrik Lindergren (patrik@ipunplugged.com) 8 * 9 * All rights reserved. --- 959 unchanged lines hidden (view full) --- 969/* 970 * Deallocate a session. 971 */ 972static int 973ubsec_freesession(void *arg, u_int64_t tid) 974{ 975 struct ubsec_softc *sc = arg; 976 int session, ret; | 2/* $OpenBSD: ubsec.c,v 1.115 2002/09/24 18:33:26 jason Exp $ */ 3 4/* 5 * Copyright (c) 2000 Jason L. Wright (jason@thought.net) 6 * Copyright (c) 2000 Theo de Raadt (deraadt@openbsd.org) 7 * Copyright (c) 2001 Patrik Lindergren (patrik@ipunplugged.com) 8 * 9 * All rights reserved. --- 959 unchanged lines hidden (view full) --- 969/* 970 * Deallocate a session. 971 */ 972static int 973ubsec_freesession(void *arg, u_int64_t tid) 974{ 975 struct ubsec_softc *sc = arg; 976 int session, ret; |
977 u_int32_t sid = ((u_int32_t) tid) & 0xffffffff; | 977 u_int32_t sid = CRYPTO_SESID2LID(tid); |
978 979 if (sc == NULL) 980 return (EINVAL); 981 982 session = UBSEC_SESSION(sid); 983 if (session < sc->sc_nsessions) { 984 bzero(&sc->sc_sessions[session], 985 sizeof(sc->sc_sessions[session])); --- 1883 unchanged lines hidden --- | 978 979 if (sc == NULL) 980 return (EINVAL); 981 982 session = UBSEC_SESSION(sid); 983 if (session < sc->sc_nsessions) { 984 bzero(&sc->sc_sessions[session], 985 sizeof(sc->sc_sessions[session])); --- 1883 unchanged lines hidden --- |