Use the protocol specified by the Test Parameter in dualstack socket tests

Correct a typo which hard-coded the protocol to UDP for the
`V4ListenerV6Connect` test.

PiperOrigin-RevId: 582347221
This commit is contained in:
Jeff Martin
2023-11-14 09:31:25 -08:00
committed by gVisor bot
parent 7ac1ecc9c5
commit e2f754086f
+2 -1
View File
@@ -239,8 +239,9 @@ TEST_P(DualStackAfMismatchTest, V6ListenerV4Connect) {
TEST_P(DualStackAfMismatchTest, V4ListenerV6Connect) {
// Gvisor does not return the correct Errno.
SKIP_IF(IsRunningOnGvisor());
ProtocolTestParam const& param = GetParam();
const FileDescriptor socket_fd =
ASSERT_NO_ERRNO_AND_VALUE(Socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP));
ASSERT_NO_ERRNO_AND_VALUE(Socket(AF_INET6, param.type, 0));
const TestAddress& v6_addr = V6Loopback();
const TestAddress& v4_addr = V4MappedLoopback();