diff options
author | 2011-04-29 13:03:12 +0000 | |
---|---|---|
committer | 2011-04-29 13:03:12 +0000 | |
commit | 8c7c1cb3d9b8ab2796b1e9c244153a197dcb94bd (patch) | |
tree | 4fe8ac9eea328d6bcffb74b41e8043b03e2ecbf9 /sys/dev/softraid.c | |
parent | The previous reconfiguration change broke IPv6 only setups. (diff) | |
download | wireguard-openbsd-8c7c1cb3d9b8ab2796b1e9c244153a197dcb94bd.tar.xz wireguard-openbsd-8c7c1cb3d9b8ab2796b1e9c244153a197dcb94bd.zip |
only handle vanilla scsi inquiry requests, reject VPD requests since theyre
not handled.
based on atascsi code.
ok marco@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index c81fd62636d..3187b6dc2c8 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.227 2011/04/14 02:11:23 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.228 2011/04/29 13:03:12 dlg Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -3468,10 +3468,17 @@ sr_raid_inquiry(struct sr_workunit *wu) { struct sr_discipline *sd = wu->swu_dis; struct scsi_xfer *xs = wu->swu_xs; + struct scsi_inquiry *cdb = (struct scsi_inquiry *)xs->cmd; struct scsi_inquiry_data inq; DNPRINTF(SR_D_DIS, "%s: sr_raid_inquiry\n", DEVNAME(sd->sd_sc)); + if (xs->cmdlen != sizeof(*cdb)) + return (EINVAL); + + if (ISSET(cdb->flags, SI_EVPD)) + return (EOPNOTSUPP); + bzero(&inq, sizeof(inq)); inq.device = T_DIRECT; inq.dev_qual2 = 0; |