this kills the TAP

This commit is contained in:
Rick V 2019-09-01 07:52:04 -05:00
parent 294b98527d
commit f93123584e
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

View File

@ -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)