+7
−7
Loading
nvme_tcp_parse_addr() uses getaddrinfo() to parse the address. Depending on the system behavior of this function differs. On FreeBSD the port is verified not to be exceeding 65535 for IPv4, meanwhile Linux does not check it at this point. test_nvme_tcp_qpair_connect_sock() UT was attempting to test the code path that is moved in this patch, but on FreeBSD was encountering failure during getaddrinfo() with different error code. This patch moves the destination port check before parsing addresses to take the same path regardless of the system used. Fixes #2936 Change-Id: I271e8c32e07a15dcf0e0ee7e90dd174c96b18858 Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17095 Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>