Forum: NGINX How would nginx record client IP address under TCP Multipath?

A1e570c0195f7dfead850afe83a62d43?d=identicon&s=25 est (Guest)
on 2014-01-03 01:50
(Received via mailing list)
Hello,

Since iOS7 supports TCP Multipath now, I think more and more devices
will
start support it.

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?

Just curious question :)
63f341734581b167c7b698169bdd2510?d=identicon&s=25 Lukas Tribus (Guest)
on 2014-01-03 02:43
(Received via mailing list)
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:
http://lwn.net/Articles/545862/




Regards,

Lukas
A1e570c0195f7dfead850afe83a62d43?d=identicon&s=25 est (Guest)
on 2014-01-03 09:11
(Received via mailing list)
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:
https://datatracker.ietf.org/doc/rfc6897/?include_text=1 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.