mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-18 21:16:54 +02:00
TAP driver requires input and output buffers for calls passed into DeviceIoControl
Otherwise the driver returns STATUS_INVALID_PARAMETER and the call fails. This should fix some Multicast issues on Windows
This commit is contained in:
parent
e3bb67d188
commit
2ee358dbfc
1 changed files with 1 additions and 1 deletions
|
@ -841,7 +841,7 @@ void WindowsEthernetTap::scanMulticastGroups(std::vector<MulticastGroup> &added,
|
|||
// pretty much anything work... IPv4, IPv6, IPX, oldskool Netbios, who knows...
|
||||
unsigned char mcastbuf[TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS_OUTPUT_BUF_SIZE];
|
||||
DWORD bytesReturned = 0;
|
||||
if (DeviceIoControl(t,TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS,(LPVOID)0,0,(LPVOID)mcastbuf,sizeof(mcastbuf),&bytesReturned,NULL)) {
|
||||
if (DeviceIoControl(t,TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS,(LPVOID)mcastbuf,sizeof(mcastbuf),(LPVOID)mcastbuf,sizeof(mcastbuf),&bytesReturned,NULL)) {
|
||||
if ((bytesReturned > 0)&&(bytesReturned <= TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS_OUTPUT_BUF_SIZE)) { // sanity check
|
||||
MAC mac;
|
||||
DWORD i = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue