d8fe1419fb
There's only one handle that's likely to be open in a long lived way: the tun registration handle. So we can force that closed automatically when the device is about to close, if it's been improperly left open. Other handles will indeed hold up closing, but if those exist, they're a sign of a larger bug elsewhere that should be addressed. On the other hand, tun registration handles might legitimately be open during driver upgrades. This also saves us the trouble of dereferencing a freed FileObject as in the general case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> |
||
---|---|---|
.. | ||
adapter_win7.h | ||
adapter.c | ||
adapter.h | ||
api.vcxproj | ||
api.vcxproj.filters | ||
driver.c | ||
driver.h | ||
exports.def | ||
extract-driverver.js | ||
logger.c | ||
logger.h | ||
main.c | ||
main.h | ||
namespace.c | ||
namespace.h | ||
nci.def | ||
nci.h | ||
ntdll.h | ||
registry.c | ||
registry.h | ||
resource.c | ||
resource.h | ||
resources.rc | ||
rundll32.c | ||
rundll32.h | ||
session.c | ||
wintun.h |