Skip to content

Commit

Permalink
Fix TUN/TAP initialization with newer TAP-Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrop72 committed Nov 13, 2016
1 parent 2b6f4d5 commit 3940ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tuntap/BTap.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ int BTap_Init2 (BTap *o, BReactor *reactor, struct BTap_init_data init_data, BTa

// get MTU

ULONG umtu;
ULONG umtu = 0;

if (!DeviceIoControl(o->device, TAP_IOCTL_GET_MTU, NULL, 0, &umtu, sizeof(umtu), &len, NULL)) {
if (!DeviceIoControl(o->device, TAP_IOCTL_GET_MTU, &umtu, sizeof(umtu), &umtu, sizeof(umtu), &len, NULL)) {
BLog(BLOG_ERROR, "DeviceIoControl(TAP_IOCTL_GET_MTU) failed");
goto fail2;
}
Expand Down

0 comments on commit 3940ed0

Please sign in to comment.