int
crypto_freesession(u_int64_t sid)
{
- u_int32_t hid, lid;
+ u_int32_t hid;
int err = 0;
if (crypto_drivers == NULL)
/* Determine two IDs */
hid = (sid >> 31) & 0xffffffff;
- lid = sid & 0xffffffff;
if (hid >= crypto_drivers_num)
return ENOENT;
/* Call the driver cleanup routine, if available */
if (crypto_drivers[hid].cc_freesession)
- err = crypto_drivers[hid].cc_freesession(lid);
+ err = crypto_drivers[hid].cc_freesession(sid);
/*
* If this was the last session of a driver marked as invalid, make
crypto_drivers[driverid].cc_process =
(int (*) (struct cryptop *)) process;
crypto_drivers[driverid].cc_freesession =
- (int (*) (u_int32_t)) freeses;
+ (int (*) (u_int64_t)) freeses;
}
return 0;
int (*cc_newsession) (u_int32_t *, struct cryptoini *);
int (*cc_process) (struct cryptop *);
- int (*cc_freesession) (u_int32_t);
+ int (*cc_freesession) (u_int64_t);
};
* Free a session.
*/
int
-swcr_freesession(u_int32_t sid)
+swcr_freesession(u_int64_t tid)
{
struct swcr_data *swd;
struct enc_xform *txf;
struct auth_hash *axf;
+ u_int32_t sid = (tid >> 31) & 0xffff;
if ((sid > swcr_sesnum) || (swcr_sessions == NULL) ||
(swcr_sessions[sid] == NULL))
caddr_t, int);
extern int swcr_process(struct cryptop *);
extern int swcr_newsession(u_int32_t *, struct cryptoini *);
-extern int swcr_freesession(u_int32_t);
+extern int swcr_freesession(u_int64_t);
extern void swcr_init(void);
#endif /* _KERNEL */