From: Arne Schwabe Date: Fri, 5 Oct 2018 13:16:32 +0000 (+0200) Subject: Skip error about ioctl(SIOCGIFCONF) failed on Android X-Git-Tag: v2.5_beta1~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e80600a45c22dd96eb1dcce6a4af7a6c361396b;p=thirdparty%2Fopenvpn.git Skip error about ioctl(SIOCGIFCONF) failed on Android Patch: V2 Do not use C99 style comments Acked-by: Gert Doering Message-Id: <20181005131632.32515-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17565.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 8a3e8b444..d97e8dbac 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -3243,6 +3243,12 @@ get_default_gateway(struct route_gateway_info *rgi) rgi->gateway.addr = 127 << 24 | 'd' << 16 | 'g' << 8 | 'w'; rgi->flags |= RGI_ADDR_DEFINED; strcpy(best_name, "android-gw"); + + /* + * Skip scanning/fetching interface from loopback interface + * It always fails and "ioctl(SIOCGIFCONF) failed" confuses users + */ + goto done; #endif /* ifndef TARGET_ANDROID */ /* scan adapter list */