core: use nmp_utils_sysctl_open_netdir() to read tun/tap sysctl

This commit is contained in:
Thomas Haller
2016-12-09 10:43:06 +01:00
parent 89a2169b98
commit d3af925b91
4 changed files with 35 additions and 52 deletions

View File

@@ -656,7 +656,7 @@ _linktype_get_type (NMPlatform *platform,
NMPlatformTunProperties props;
if ( platform
&& nm_platform_link_tun_get_properties_ifname (platform, ifname, &props)) {
&& nm_platform_link_tun_get_properties (platform, ifindex, ifname ?: "", &props)) {
if (!g_strcmp0 (props.mode, "tap"))
return NM_LINK_TYPE_TAP;
if (!g_strcmp0 (props.mode, "tun"))