Skip to contentSkip to conversation

Skip error about ioctl(SIOCGIFCONF) failed on Android

PATCH New Arne Schwabe 2 participants 3 messages Oct 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Skip error about ioctl(SIOCGIFCONF) failed on Android

---
 src/openvpn/route.c | 4 ++++
 1 file changed, 4 insertions(+)
src/openvpn/route.c +4 -0
index cadd34e1..a1d4ade1 100644
@@ -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 */
Signature · 1 line
2.19.0
#1 lore raw

PATCH 1/1 Skip error about ioctl(SIOCGIFCONF) failed on Android

Patch: V2 Do not use C99 style comments

---
 src/openvpn/route.c | 6 ++++++
 1 file changed, 6 insertions(+)
src/openvpn/route.c +6 -0
index cadd34e1..cb337c42 100644
@@ -3258,6 +3258,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 inteface
+     * It always fails and ioctl(SIOCGIFCONF) failed" confuses users
+     */
+    goto done;
 #endif /* ifndef TARGET_ANDROID */
 
     /* scan adapter list */
Signature · 1 line
2.19.0
Acked-by on v1 1/1
#2 lore raw

Passes the style guide filter, fixes an annoying and misleading warning, and affects only Android. Fixed two typos in the comment.

Your patch has been applied to the master branch.

commit 5e80600a45c22dd96eb1dcce6a4af7a6c361396b

Author: Arne Schwabe
Date:   Fri Oct 5 15:16:32 2018 +0200
     Skip error about ioctl(SIOCGIFCONF) failed on Android

     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg17565.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering