git: 5ea1e35d7de6 - main - ktls tests: Populate sockaddr fields before binding
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 30 Mar 2023 17:55:27 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5ea1e35d7de69cc4e0311b987adaa98e6c19424c commit 5ea1e35d7de69cc4e0311b987adaa98e6c19424c Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-03-30 17:52:04 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-03-30 17:52:04 +0000 ktls tests: Populate sockaddr fields before binding Reported by: Jenkins Fixes: b4b33821fa3d ("ktls: Fix interlocking between ktls_enable_rx() and listen(2)") --- tests/sys/kern/ktls_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index e925dbe32e52..a3d0c17d6d62 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -2801,6 +2801,8 @@ ATF_TC_BODY(ktls_listening_socket, tc) s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ATF_REQUIRE(s >= 0); memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); ATF_REQUIRE(bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0); ATF_REQUIRE(listen(s, 1) == 0); build_tls_enable(tc, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0,