+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 Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17095 (master) (cherry picked from commit f92411c4) Change-Id: I271e8c32e07a15dcf0e0ee7e90dd174c96b18858 Signed-off-by:
Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17519 Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Tested-by:
Jim Harris <james.r.harris@intel.com>