Skip to content
Snippets Groups Projects
Commit 1ea9cb1f authored by Sébastien Blin's avatar Sébastien Blin
Browse files

ios: ignore point-to-point network

On a lot of iOS devices, a lot of weird IPv6 candidates seems to
be added from generally unused interfaces (tun0->2, ipsec_0-9, pdp_ip1->4)
Those interfaces seems to be up and running but instead a classic
link-local address (fe80:: like on macOS), some un-assigned ipv6
seems to be generated (2605:8d80:: or  2001:56f::) and seems un-documented.

Except ignoring point to point network for now, I don't see any good
solution. And this problem seems to only appears on iOS (macOS got tun0->2
but with a correct link local address).

Change-Id: I7724150ea2fdd93fbccac83cfa0c0c691452e820
parent 80abd8b7
Branches
No related tags found
No related merge requests found
pjlib/src/pj/ip_helper_generic.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/pjlib/src/pj/ip_helper_generic.c b/pjlib/src/pj/ip_helper_generic.c
index ab441a504..c818468b3 100644
--- a/pjlib/src/pj/ip_helper_generic.c
+++ b/pjlib/src/pj/ip_helper_generic.c
@@ -102,6 +102,13 @@ static pj_status_t if_enum_by_af(int af,
continue; /* Skip when interface is not running */
}
+#if defined(__APPLE__)
+ if (it->ifa_flags & IFF_POINTOPOINT) {
+ TRACE_((THIS_FILE, " point to point interface"));
+ continue; /* Skip point to point interface */
+ }
+#endif
+
#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
if (it->ifa_flags & IFF_LOOPBACK) {
TRACE_((THIS_FILE, " loopback interface"));
@@ -231,6 +238,13 @@ static pj_status_t if_enum_by_af(int af,
continue; /* Skip when interface is not running */
}
+#if defined(__APPLE__)
+ if (iff.ifr_flags & IFF_POINTOPOINT) {
+ TRACE_((THIS_FILE, " point to point interface"));
+ continue; /* Skip point to point interface */
+ }
+#endif
+
#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
if (iff.ifr_flags & IFF_LOOPBACK) {
TRACE_((THIS_FILE, " loopback interface"));
@@ -322,11 +336,18 @@ static pj_status_t if_enum_by_af(int af, unsigned *p_cnt, pj_sockaddr ifs[])
continue; /* Skip when interface is down */
}
- if ((ifreq.ifr_flags & IFF_RUNNING)==0) {
+ if ((ifreq.ifr_flags & IFF_RUNNING)==0) {
TRACE_((THIS_FILE, " interface is not running"));
continue; /* Skip when interface is not running */
}
+#if defined(__APPLE__)
+ if (ifreq.ifr_flags & IFF_POINTOPOINT) {
+ TRACE_((THIS_FILE, " point to point interface"));
+ continue; /* Skip point to point interface */
+ }
+#endif
+
#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
if (ifreq.ifr_flags & IFF_LOOPBACK) {
TRACE_((THIS_FILE, " loopback interface"));
......@@ -48,6 +48,9 @@ pjproject: pjproject-$(PJPROJECT_VERSION).tar.gz .sum-pjproject
$(APPLY) $(SRC)/pjproject/0009-add-config-site.patch
ifdef HAVE_ANDROID
$(APPLY) $(SRC)/pjproject/0001-android.patch
endif
ifdef HAVE_IOS
$(APPLY) $(SRC)/pjproject/0003-disable-ios-pointtopoint.patch
endif
$(UPDATE_AUTOCONFIG)
$(MOVE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment