mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
initialise length field in netmask_addr
This commit is contained in:
parent
45cffb4b2b
commit
ba4cd5e7b4
2
lsif.c
2
lsif.c
@ -113,6 +113,7 @@ int scrapeProcNetRoute()
|
|||||||
broadcast.inet.sin_addr.s_addr=addr.inet.sin_addr.s_addr | ~netmask.s_addr;
|
broadcast.inet.sin_addr.s_addr=addr.inet.sin_addr.s_addr | ~netmask.s_addr;
|
||||||
|
|
||||||
struct socket_address netmask_addr;
|
struct socket_address netmask_addr;
|
||||||
|
netmask_addr.addrlen = sizeof(netmask_addr.inet);
|
||||||
netmask_addr.inet.sin_family=AF_INET;
|
netmask_addr.inet.sin_family=AF_INET;
|
||||||
netmask_addr.inet.sin_addr.s_addr=netmask.s_addr;
|
netmask_addr.inet.sin_addr.s_addr=netmask.s_addr;
|
||||||
|
|
||||||
@ -202,6 +203,7 @@ lsif(void) {
|
|||||||
broadcast.inet.sin_addr.s_addr=addr.inet.sin_addr.s_addr | ~netmask.s_addr;
|
broadcast.inet.sin_addr.s_addr=addr.inet.sin_addr.s_addr | ~netmask.s_addr;
|
||||||
|
|
||||||
struct socket_address netmask_addr;
|
struct socket_address netmask_addr;
|
||||||
|
netmask_addr.addrlen = sizeof(netmask_addr.inet);
|
||||||
netmask_addr.inet.sin_family=AF_INET;
|
netmask_addr.inet.sin_family=AF_INET;
|
||||||
netmask_addr.inet.sin_addr.s_addr=netmask.s_addr;
|
netmask_addr.inet.sin_addr.s_addr=netmask.s_addr;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user