diff options
author | Lev Stipakov | 2022-08-14 23:53:03 +0200 |
---|---|---|
committer | Gert Doering | 2022-08-16 08:00:52 +0200 |
commit | 5c4fa12b0be29dcb18edac62c8c29f91f4ff59b1 (patch) | |
tree | 884385f6a14a4d323577376dd9d1ae5fb71cf6e9 /src/openvpn/tun.h | |
parent | cea978bcb60a3b18be6d227466702fb14d6bc490 (diff) | |
download | openvpn-5c4fa12b0be29dcb18edac62c8c29f91f4ff59b1.zip openvpn-5c4fa12b0be29dcb18edac62c8c29f91f4ff59b1.tar.gz |
tun: properly handle device interface list
Device interface is a path which is used by userspace
to access device. A driver can create one or more device
interfaces and specify "reference string", so that userspace
could enumerate all device interfaces in the list and pick
the corrct one which ends with reference string.
Before our code had an assumption that either driver
creates only one device interface or the "right" interface
is alwways first in the list. As it turned out, that assumtion
does not always hold, so here we iterate through all device
interfaces in the list.
In follow-up dco-win patch we pick the device interface
from the list which ends with specific reference string.
v3: change allocation to use regular gc_malloc() instead of buffer.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20220814215303.305-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24938.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/tun.h')
-rw-r--r-- | src/openvpn/tun.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h index ea4946e..661e4d0 100644 --- a/src/openvpn/tun.h +++ b/src/openvpn/tun.h @@ -388,7 +388,7 @@ struct panel_reg struct device_instance_id_interface { LPBYTE net_cfg_instance_id; - const char *device_interface_list; + const char *device_interface; struct device_instance_id_interface *next; }; |