diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/util/Utils.kt b/mobile/src/main/java/be/mygod/vpnhotspot/util/Utils.kt index a6c60dcd..2b024db6 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/util/Utils.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/util/Utils.kt @@ -188,5 +188,5 @@ fun if_nametoindex(ifname: String) = if (Build.VERSION.SDK_INT >= 26) { } catch (_: FileNotFoundException) { NetworkInterface.getByName(ifname)?.index ?: 0 } catch (e: IOException) { - if ((e.cause as? ErrnoException)?.errno == OsConstants.ENODEV) -1 else throw e + if ((e.cause as? ErrnoException)?.errno == OsConstants.ENODEV) 0 else throw e }