mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
this kills the TAP
This commit is contained in:
parent
294b98527d
commit
f93123584e
13
vendor/libtuntap-master/tuntap-windows.c
vendored
13
vendor/libtuntap-master/tuntap-windows.c
vendored
@ -372,7 +372,6 @@ int
|
|||||||
tuntap_sys_set_ipv4(struct device *dev, t_tun_in_addr *s, uint32_t mask)
|
tuntap_sys_set_ipv4(struct device *dev, t_tun_in_addr *s, uint32_t mask)
|
||||||
{
|
{
|
||||||
IPADDR sock[3];
|
IPADDR sock[3];
|
||||||
IPADDR pp[2];
|
|
||||||
DWORD len, ret;
|
DWORD len, ret;
|
||||||
IPADDR ep[4];
|
IPADDR ep[4];
|
||||||
#pragma pack(push)
|
#pragma pack(push)
|
||||||
@ -397,18 +396,6 @@ tuntap_sys_set_ipv4(struct device *dev, t_tun_in_addr *s, uint32_t mask)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pp[0] = s->S_un.S_addr;
|
|
||||||
pp[1] = mask;
|
|
||||||
|
|
||||||
ret = DeviceIoControl(dev->tun_fd, TAP_IOCTL_CONFIG_POINT_TO_POINT, &pp, sizeof(pp),
|
|
||||||
&pp, sizeof(pp), &len, NULL);
|
|
||||||
if(!ret)
|
|
||||||
{
|
|
||||||
int errcode = GetLastError();
|
|
||||||
tuntap_log(TUNTAP_LOG_ERR, (const char *)formated_error(L"%1%0", errcode));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ep[0] = s->S_un.S_addr;
|
ep[0] = s->S_un.S_addr;
|
||||||
ep[1] = mask;
|
ep[1] = mask;
|
||||||
ep[2] = (s->S_un.S_addr | ~mask)
|
ep[2] = (s->S_un.S_addr | ~mask)
|
||||||
|
Loading…
Reference in New Issue
Block a user