Skip to content

Commit c7ca975

Browse files
hreineckekeithbusch
authored andcommitted
nvme: blank out authentication fabrics options if not configured
If the config option NVME_HOST_AUTH is not selected we should not accept the corresponding fabrics options. This allows userspace to detect if NVMe authentication has been enabled for the kernel. Cc: Shin'ichiro Kawasaki <[email protected]> Fixes: f50fff7 ("nvme: implement In-Band authentication") Signed-off-by: Hannes Reinecke <[email protected]> Tested-by: Shin'ichiro Kawasaki <[email protected]> Reviewed-by: Daniel Wagner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent cd9aed6 commit c7ca975

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/nvme/host/fabrics.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,10 @@ static const match_table_t opt_tokens = {
667667
#endif
668668
{ NVMF_OPT_FAIL_FAST_TMO, "fast_io_fail_tmo=%d" },
669669
{ NVMF_OPT_DISCOVERY, "discovery" },
670+
#ifdef CONFIG_NVME_HOST_AUTH
670671
{ NVMF_OPT_DHCHAP_SECRET, "dhchap_secret=%s" },
671672
{ NVMF_OPT_DHCHAP_CTRL_SECRET, "dhchap_ctrl_secret=%s" },
673+
#endif
672674
#ifdef CONFIG_NVME_TCP_TLS
673675
{ NVMF_OPT_TLS, "tls" },
674676
#endif

0 commit comments

Comments
 (0)