]> www.infradead.org Git - users/sagi/libnvme.git/commit
fabrics: unconditionally strip discovery entry strings
authorCaleb Sander <csander@purestorage.com>
Wed, 30 Aug 2023 15:53:19 +0000 (09:53 -0600)
committerDaniel Wagner <wagi@monom.org>
Mon, 4 Sep 2023 17:23:24 +0000 (19:23 +0200)
commitbc6e07ad3dfcc201dd508f19b134896992713298
treea600172d9269abb73f94cdf106049f2f0557fcce
parent308c3e15e29177e9321ad3b7c39a4ad9b2961dcb
fabrics: unconditionally strip discovery entry strings

The NVMe base specification defines fields TRSVCID and TRADDR
as "ASCII strings", meaning they are space-padded.
Therefore, whether spaces need to be stripped from them
doesn't depend on the transport or address family.
Some combinations already appear to be missing,
such as RDMA using IB addresses.
And if new transports are added in the future,
sanitize_discovery_log_entry() would need to be updated.

So strip spaces from these fields regardless of the entry's
transport type or address family.

Signed-off-by: Caleb Sander <csander@purestorage.com>
src/nvme/fabrics.c