summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2018-02-23 13:42:02 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2018-02-23 13:42:02 -0800
commit2ee358dbfcf8483db0fed2a961b1ce56a37355ec (patch)
treeab2ec346964e4f648713003c4fb7985e26b77f6c
parente3bb67d18812c34ca92dadeb57b32eacc9bd5dbc (diff)
downloadinfinitytier-2ee358dbfcf8483db0fed2a961b1ce56a37355ec.tar.gz
infinitytier-2ee358dbfcf8483db0fed2a961b1ce56a37355ec.zip
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
-rw-r--r--osdep/WindowsEthernetTap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/WindowsEthernetTap.cpp b/osdep/WindowsEthernetTap.cpp
index 64ab3943..aa96d33a 100644
--- a/osdep/WindowsEthernetTap.cpp
+++ b/osdep/WindowsEthernetTap.cpp
@@ -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;