4

I am using a webrtc on an iOS device. Webrtc opens 4 UDP connections to a server. By taking a network trace at the server, it is apparent that the iOS device may use both its mobile data IP address and its WiFi address simultaneously to make these connections, which is a problem for the server, which does not recognize these as being from the same client. When all four UDP connections are from the same source IP, everything is fine. But when the UDP connections are split between source IP addresses, the application fails. I do not have the capability to rewrite the server to handle this strange behavior.

The iOS device has used multiple network interfaces when both connections are stable; the phone is in one place and no handoffs occur. We have tested with both home (minimal other traffic/interference) and enterprise WiFi connections. All UDP connections are started simultaneously by Google's libjingle webrtc library.

Is there a way to force all of the UDP connections to be made from the same network interface on iOS?


The multiple source addresses is a feature of iOS known as multipath or multihoming. See iOS multipath TCP announcment. I assume this is used for UDP too.

mattm
  • 5,851
  • 11
  • 47
  • 77
  • CFSocketCopyAddress to get the current address? You haven't indicated how you're creating the socket. – Marcus Adams Feb 04 '15 at 21:30
  • Does this happen when the iPhone moves from WIFI to data? or do you notice this behavior even when the iPhone is constantly connected to a stable WIFI connection? – Zigglzworth Feb 04 '15 at 21:40

0 Answers0