[Openvpn-devel] Skip error about ioctl(SIOCGIFCONF) failed on Android

Message ID 20181005130500.32130-1-arne@rfc2549.org
State Accepted
Headers show
Series
  • [Openvpn-devel] Skip error about ioctl(SIOCGIFCONF) failed on Android
Related show

Commit Message

Arne Schwabe Oct. 5, 2018, 1:05 p.m.
---
 src/openvpn/route.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index cadd34e1..a1d4ade1 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -3258,6 +3258,10 @@  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 inteface
+    // It always fails and ioctl(SIOCGIFCONF) failed" confuses users
+    goto done;
 #endif /* ifndef TARGET_ANDROID */
 
     /* scan adapter list */