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
4932eec3
Commit
4932eec3
authored
Apr 12, 2020
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Use the dst sa_family for the netmask too.
Signed-off-by:
Stefan Dösinger
<
stefan@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f4beb08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
ipstats.c
dlls/iphlpapi/ipstats.c
+9
-2
No files found.
dlls/iphlpapi/ipstats.c
View file @
4932eec3
...
...
@@ -1508,6 +1508,7 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForw
for
(
next
=
buf
;
next
<
lim
;
next
+=
rtm
->
rtm_msglen
)
{
int
i
;
sa_family_t
dst_family
=
AF_UNSPEC
;
rtm
=
(
struct
rt_msghdr
*
)
next
;
...
...
@@ -1551,7 +1552,10 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForw
if
(
sa
->
sa_len
==
0
)
{
addr
=
0
;
}
else
{
switch
(
sa
->
sa_family
)
{
/* Apple's netstat prints the netmask together with the destination
* and only looks at the destination's address family. The netmask's
* sa_family sometimes contains the non-existent value 0xff. */
switch
(
i
==
RTA_NETMASK
?
dst_family
:
sa
->
sa_family
)
{
case
AF_INET
:
{
struct
sockaddr_in
*
sin
=
(
struct
sockaddr_in
*
)
sa
;
addr
=
sin
->
sin_addr
.
s_addr
;
...
...
@@ -1575,7 +1579,10 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForw
switch
(
i
)
{
case
RTA_DST
:
row
.
dwForwardDest
=
addr
;
break
;
case
RTA_DST
:
row
.
dwForwardDest
=
addr
;
dst_family
=
sa
->
sa_family
;
break
;
case
RTA_GATEWAY
:
row
.
dwForwardNextHop
=
addr
;
break
;
case
RTA_NETMASK
:
row
.
dwForwardMask
=
addr
;
break
;
default:
...
...
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