mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-18 20:47:53 +00:00
ext/libnatpmp: Set sa_len properly in getdefaultgateway()
In USE_SOCKET_ROUTE's implementation, sa_len of the sockaddrs need to be set as well. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
30c77cfee5
commit
511c77aa99
@ -271,7 +271,9 @@ int getdefaultgateway(in_addr_t *addr)
|
||||
rtm.rtm_addrs = rtm_addrs;
|
||||
|
||||
so_dst.sa_family = AF_INET;
|
||||
so_dst.sa_len = sizeof(struct sockaddr);
|
||||
so_mask.sa_family = AF_INET;
|
||||
so_mask.sa_len = sizeof(struct sockaddr);
|
||||
|
||||
NEXTADDR(RTA_DST, so_dst);
|
||||
NEXTADDR(RTA_NETMASK, so_mask);
|
||||
|
Loading…
Reference in New Issue
Block a user