]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Delete TAP interface before the TAP driver is uninstalled
authorSimon Rozman <simon@rozman.si>
Mon, 12 Nov 2018 12:22:44 +0000 (13:22 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 17 Jan 2019 17:35:46 +0000 (18:35 +0100)
commit39c9811e7d3a509405b2986e9684a99054f25923
tree22e524f8cc6b6a3fbe175a2f15837a742471acfe
parent27556854a512a901dba5118ad18b37f3abf0d440
Delete TAP interface before the TAP driver is uninstalled

The previous version of MSI installer did:
- Execution Pass:       rename the TAP interface to some temporary name
- Commit/Rollback Pass: delete the TAP interface / rename the interface
                        back to original name

However, the WiX Toolset's Diffx extension to install and remove drivers
removed the TAP driver between the execution and commit passes. The TAP
driver removal makes all TAP interfaces unavailable and our custom
action couldn't find the interface to delete any more.

While the system where OpenVPN was uninstalled didn't have any TAP
interfaces any more as expected behaviour, the problem appears after
reinstalling the OpenVPN. Some residue TAP interface registry keys
remain on the system, causing the TAP interface to reappear as "Ethernet
NN" interface next time the TAP driver is installed. This causes TAP
interfaces to accumulate when cycling install-uninstall-install...

Therefore, it is better to remove the TAP interfaces before the TAP
driver is removed, and reinstall the TAP interface back should the
rollback be required. Though it won't be exactly the same interface
again.

I wonder if the WiX Diffx extension supports execute/commit/rollback
feature of MSI in the first place.
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20181112122246.13556-1-simon@rozman.si>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17906.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnmsica/msica_op.c