Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6d6b4bff
Commit
6d6b4bff
authored
May 10, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Enable IP_DONTFRAGMENT by default for SOCK_STREAM sockets.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2538a74c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
1 deletion
+59
-1
socket.c
dlls/ws2_32/socket.c
+6
-1
sock.c
dlls/ws2_32/tests/sock.c
+53
-0
No files found.
dlls/ws2_32/socket.c
View file @
6d6b4bff
...
...
@@ -7606,9 +7606,14 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
if
(
ipxptype
>
0
)
set_ipx_packettype
(
ret
,
ipxptype
);
/* ensure IP_DONTFRAGMENT is disabled, in Linux the global default can be enabled */
if
(
unixaf
==
AF_INET
||
unixaf
==
AF_INET6
)
{
/* ensure IP_DONTFRAGMENT is disabled for SOCK_DGRAM and SOCK_RAW, enabled for SOCK_STREAM */
if
(
unixtype
==
SOCK_DGRAM
||
unixtype
==
SOCK_RAW
)
/* in Linux the global default can be enabled */
set_dont_fragment
(
ret
,
unixaf
==
AF_INET6
?
IPPROTO_IPV6
:
IPPROTO_IP
,
FALSE
);
else
if
(
unixtype
==
SOCK_STREAM
)
set_dont_fragment
(
ret
,
unixaf
==
AF_INET6
?
IPPROTO_IPV6
:
IPPROTO_IP
,
TRUE
);
}
#ifdef IPV6_V6ONLY
if
(
unixaf
==
AF_INET6
)
...
...
dlls/ws2_32/tests/sock.c
View file @
6d6b4bff
...
...
@@ -1908,6 +1908,59 @@ todo_wine
ok
(
value
==
1
,
"Expected 1, got %d
\n
"
,
value
);
closesocket
(
s
);
s
=
socket
(
family
,
SOCK_STREAM
,
0
);
if
(
s
==
INVALID_SOCKET
&&
i
)
{
skip
(
"IPv6 is not supported
\n
"
);
break
;
}
ok
(
s
!=
INVALID_SOCKET
,
"socket failed with error %d
\n
"
,
GetLastError
());
size
=
sizeof
(
value
);
value
=
0xdead
;
err
=
getsockopt
(
s
,
level
,
IP_DONTFRAGMENT
,
(
char
*
)
&
value
,
&
size
);
ok
(
!
err
,
"Expected 0, got %d with error %d
\n
"
,
err
,
GetLastError
());
ok
(
value
==
1
||
broken
(
value
==
0
)
/* < vista */
,
"Expected 1, got %d
\n
"
,
value
);
size
=
sizeof
(
value
);
value
=
0
;
err
=
setsockopt
(
s
,
level
,
IP_DONTFRAGMENT
,
(
char
*
)
&
value
,
size
);
ok
(
!
err
,
"Expected 0, got %d with error %d
\n
"
,
err
,
GetLastError
());
value
=
0xdead
;
err
=
getsockopt
(
s
,
level
,
IP_DONTFRAGMENT
,
(
char
*
)
&
value
,
&
size
);
ok
(
!
err
,
"Expected 0, got %d with error %d
\n
"
,
err
,
GetLastError
());
ok
(
value
==
0
,
"Expected 0, got %d
\n
"
,
value
);
closesocket
(
s
);
s
=
socket
(
family
,
SOCK_RAW
,
0
);
if
(
s
==
INVALID_SOCKET
)
{
if
(
WSAGetLastError
()
==
WSAEACCES
)
skip
(
"SOCK_RAW is not available
\n
"
);
else
if
(
i
)
skip
(
"IPv6 is not supported
\n
"
);
break
;
}
ok
(
s
!=
INVALID_SOCKET
,
"socket failed with error %d
\n
"
,
GetLastError
());
size
=
sizeof
(
value
);
value
=
0xdead
;
err
=
getsockopt
(
s
,
level
,
IP_DONTFRAGMENT
,
(
char
*
)
&
value
,
&
size
);
ok
(
!
err
,
"Expected 0, got %d with error %d
\n
"
,
err
,
GetLastError
());
ok
(
value
==
0
,
"Expected 0, got %d
\n
"
,
value
);
size
=
sizeof
(
value
);
value
=
1
;
err
=
setsockopt
(
s
,
level
,
IP_DONTFRAGMENT
,
(
char
*
)
&
value
,
size
);
ok
(
!
err
,
"Expected 0, got %d with error %d
\n
"
,
err
,
GetLastError
());
value
=
0xdead
;
err
=
getsockopt
(
s
,
level
,
IP_DONTFRAGMENT
,
(
char
*
)
&
value
,
&
size
);
ok
(
!
err
,
"Expected 0, got %d with error %d
\n
"
,
err
,
GetLastError
());
ok
(
value
==
1
,
"Expected 1, got %d
\n
"
,
value
);
closesocket
(
s
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment