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
8f37560f
Commit
8f37560f
authored
Aug 12, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Aug 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsiproxy: Don't use the key size to determine the address family as it can be zero.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5b99e791
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
ip.c
dlls/nsiproxy.sys/ip.c
+19
-4
No files found.
dlls/nsiproxy.sys/ip.c
View file @
8f37560f
...
@@ -722,7 +722,7 @@ static void unicast_fill_entry( struct ifaddrs *entry, void *key, struct nsi_ip_
...
@@ -722,7 +722,7 @@ static void unicast_fill_entry( struct ifaddrs *entry, void *key, struct nsi_ip_
if
(
stat
)
stat
->
creation_time
=
get_boot_time
();
if
(
stat
)
stat
->
creation_time
=
get_boot_time
();
}
}
static
NTSTATUS
ip_unicast_enumerate_all
(
void
*
key_data
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
static
NTSTATUS
ip_unicast_enumerate_all
(
int
family
,
void
*
key_data
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
,
DWORD_PTR
*
count
)
void
*
static_data
,
DWORD
static_size
,
DWORD_PTR
*
count
)
{
{
...
@@ -730,7 +730,6 @@ static NTSTATUS ip_unicast_enumerate_all( void *key_data, DWORD key_size, void *
...
@@ -730,7 +730,6 @@ static NTSTATUS ip_unicast_enumerate_all( void *key_data, DWORD key_size, void *
NTSTATUS
status
=
STATUS_SUCCESS
;
NTSTATUS
status
=
STATUS_SUCCESS
;
BOOL
want_data
=
key_size
||
rw_size
||
dynamic_size
||
static_size
;
BOOL
want_data
=
key_size
||
rw_size
||
dynamic_size
||
static_size
;
struct
ifaddrs
*
addrs
,
*
entry
;
struct
ifaddrs
*
addrs
,
*
entry
;
int
family
=
(
key_size
==
sizeof
(
struct
nsi_ipv4_unicast_key
))
?
AF_INET
:
AF_INET6
;
TRACE
(
"%p %d %p %d %p %d %p %d %p
\n
"
,
key_data
,
key_size
,
rw_data
,
rw_size
,
TRACE
(
"%p %d %p %d %p %d %p %d %p
\n
"
,
key_data
,
key_size
,
rw_data
,
rw_size
,
dynamic_data
,
dynamic_size
,
static_data
,
static_size
,
count
);
dynamic_data
,
dynamic_size
,
static_data
,
static_size
,
count
);
...
@@ -760,6 +759,22 @@ static NTSTATUS ip_unicast_enumerate_all( void *key_data, DWORD key_size, void *
...
@@ -760,6 +759,22 @@ static NTSTATUS ip_unicast_enumerate_all( void *key_data, DWORD key_size, void *
return
status
;
return
status
;
}
}
static
NTSTATUS
ipv4_unicast_enumerate_all
(
void
*
key_data
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
,
DWORD_PTR
*
count
)
{
return
ip_unicast_enumerate_all
(
AF_INET
,
key_data
,
key_size
,
rw_data
,
rw_size
,
dynamic_data
,
dynamic_size
,
static_data
,
static_size
,
count
);
}
static
NTSTATUS
ipv6_unicast_enumerate_all
(
void
*
key_data
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
,
DWORD_PTR
*
count
)
{
return
ip_unicast_enumerate_all
(
AF_INET6
,
key_data
,
key_size
,
rw_data
,
rw_size
,
dynamic_data
,
dynamic_size
,
static_data
,
static_size
,
count
);
}
static
NTSTATUS
ip_unicast_get_all_parameters
(
const
void
*
key
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
static
NTSTATUS
ip_unicast_get_all_parameters
(
const
void
*
key
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
)
void
*
static_data
,
DWORD
static_size
)
...
@@ -1263,7 +1278,7 @@ static struct module_table ipv4_tables[] =
...
@@ -1263,7 +1278,7 @@ static struct module_table ipv4_tables[] =
sizeof
(
struct
nsi_ipv4_unicast_key
),
sizeof
(
struct
nsi_ip_unicast_rw
),
sizeof
(
struct
nsi_ipv4_unicast_key
),
sizeof
(
struct
nsi_ip_unicast_rw
),
sizeof
(
struct
nsi_ip_unicast_dynamic
),
sizeof
(
struct
nsi_ip_unicast_static
)
sizeof
(
struct
nsi_ip_unicast_dynamic
),
sizeof
(
struct
nsi_ip_unicast_static
)
},
},
ip_unicast_enumerate_all
,
ip
v4
_unicast_enumerate_all
,
ip_unicast_get_all_parameters
,
ip_unicast_get_all_parameters
,
},
},
{
{
...
@@ -1328,7 +1343,7 @@ static struct module_table ipv6_tables[] =
...
@@ -1328,7 +1343,7 @@ static struct module_table ipv6_tables[] =
sizeof
(
struct
nsi_ipv6_unicast_key
),
sizeof
(
struct
nsi_ip_unicast_rw
),
sizeof
(
struct
nsi_ipv6_unicast_key
),
sizeof
(
struct
nsi_ip_unicast_rw
),
sizeof
(
struct
nsi_ip_unicast_dynamic
),
sizeof
(
struct
nsi_ip_unicast_static
)
sizeof
(
struct
nsi_ip_unicast_dynamic
),
sizeof
(
struct
nsi_ip_unicast_static
)
},
},
ip_unicast_enumerate_all
,
ip
v6
_unicast_enumerate_all
,
ip_unicast_get_all_parameters
,
ip_unicast_get_all_parameters
,
},
},
{
{
...
...
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