How would nginx record client IP address under TCP Multipath?

est electronixtar at
Fri Jan 3 08:10:08 UTC 2014

That's very helpful info. Thanks!

So getsockname() and getpeername() returns the initial subflow, what's the
API to get other subflows?

Edit: found my answer: by
using setsockopt() and getsockopt()

The functions getpeername() and getsockname() SHOULD also always
   return the addresses of the first subflow if the socket is used by an
   MPTCP-aware application, in order to be consistent with MPTCP-unaware
   applications, and, e.g., also with the Stream Control Transmission
   Protocol (SCTP).  Instead of getpeername() or getsockname(),
   MPTCP-aware applications can use new API calls, described in
   Section 5.3, in order to retrieve the full list of address pairs for
   the subflows in use.

On Fri, Jan 3, 2014 at 9:43 AM, Lukas Tribus <luky-37 at> wrote:

> Hi,
> > Since iOS7 supports TCP Multipath now, I think more and more devices
> > will start support it.
> Not if the servers don't support it.
> Apple pushed for a specific reason:
> To avoid having a broken TCP session when the IP address of the handheld
> changes, which would interrupt Apple's Siri.
> But TCP multipath is still not supported by linux mainline and I don't
> see efforts on linux-netdev to include it anytime soon. I understand there
> is a maintained and uptodate patchset available, but that doesn't mean
> it will be included in the kernel soon.
> > But TCP Multipath allows many client IPs connected to the same server,
> > suppose Nginx in this case, how would access_log record all of the IPs?
> The application will always see the first IP, which connected to the
> server,
> as per:
> Regards,
> Lukas
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list