diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/anytun.suo | bin | 62976 -> 62464 bytes | |||
-rw-r--r-- | src/win32/tunDevice.cpp | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/anytun.suo b/src/anytun.suo Binary files differindex dc86967..8b70223 100644 --- a/src/anytun.suo +++ b/src/anytun.suo diff --git a/src/win32/tunDevice.cpp b/src/win32/tunDevice.cpp index 4986381..538269e 100644 --- a/src/win32/tunDevice.cpp +++ b/src/win32/tunDevice.cpp @@ -275,4 +275,14 @@ void TunDevice::do_ifconfig() msg << "Unable to set device dhcp masq mode: " << LogErrno(err); throw std::runtime_error(msg.str()); } + + u_long mtu; + err = performIoControl(TAP_IOCTL_CONFIG_DHCP_MASQ, &mtu, sizeof(mtu), &mtu, sizeof(mtu)); + if(err != ERROR_SUCCESS) { + CloseHandle(handle_); + std::stringstream msg; + msg << "Unable to get device mtu: " << LogErrno(err); + throw std::runtime_error(msg.str()); + } + conf_.mtu_ = static_cast<u_int16_t>(mtu); } |