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
1639c23c
Commit
1639c23c
authored
May 10, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
May 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use unsigned interface index on interface_bind_check.
Signed-off-by:
Bruno Jesus
<
bjesus@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0be75640
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
socket.c
dlls/ws2_32/socket.c
+6
-6
No files found.
dlls/ws2_32/socket.c
View file @
1639c23c
...
@@ -3671,7 +3671,8 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr)
...
@@ -3671,7 +3671,8 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr)
#if !defined(IP_BOUND_IF) && !defined(LINUX_BOUND_IF)
#if !defined(IP_BOUND_IF) && !defined(LINUX_BOUND_IF)
return
;
return
;
#else
#else
int
ifindex
;
unsigned
int
ifindex
;
int
ret
;
socklen_t
len
;
socklen_t
len
;
/* Check for IPv4, address 0.0.0.0 and UDP socket */
/* Check for IPv4, address 0.0.0.0 and UDP socket */
...
@@ -3680,15 +3681,14 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr)
...
@@ -3680,15 +3681,14 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr)
if
(
_get_fd_type
(
fd
)
!=
SOCK_DGRAM
)
if
(
_get_fd_type
(
fd
)
!=
SOCK_DGRAM
)
return
;
return
;
ifindex
=
-
1
;
len
=
sizeof
(
ifindex
);
len
=
sizeof
(
ifindex
);
#if defined(IP_BOUND_IF)
#if defined(IP_BOUND_IF)
getsockopt
(
fd
,
IPPROTO_IP
,
IP_BOUND_IF
,
&
ifindex
,
&
len
);
ret
=
getsockopt
(
fd
,
IPPROTO_IP
,
IP_BOUND_IF
,
&
ifindex
,
&
len
);
#elif defined(LINUX_BOUND_IF)
#elif defined(LINUX_BOUND_IF)
getsockopt
(
fd
,
IPPROTO_IP
,
IP_UNICAST_IF
,
&
ifindex
,
&
len
);
ret
=
getsockopt
(
fd
,
IPPROTO_IP
,
IP_UNICAST_IF
,
&
ifindex
,
&
len
);
if
(
ifindex
>
0
)
ifindex
=
ntohl
(
ifindex
);
if
(
!
ret
)
ifindex
=
ntohl
(
ifindex
);
#endif
#endif
if
(
ifindex
>
0
)
if
(
!
ret
)
{
{
PIP_ADAPTER_INFO
adapters
,
adapter
;
PIP_ADAPTER_INFO
adapters
,
adapter
;
DWORD
adap_size
;
DWORD
adap_size
;
...
...
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