All of lore.kernel.org
 help / color / mirror / Atom feed
* Multiple connections from the same source address.
@ 2017-09-08  9:03 David Laight
  2017-09-08  9:29 ` Michael Tuexen
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: David Laight @ 2017-09-08  9:03 UTC (permalink / raw)
  To: linux-sctp

Can anyone think how to create multiple outgoing connections
from the same subset of local IP addresses and the same port?

We bind() to the first IP address and port, then use
SCTP_SOCKOPT_BINDX_ADD to add the second IP address.
But even with IP_REUASADDR set you can't repeat that on
a second socket.

It is possible to bind a second socket by reversing the
order of the IP addresses (this might be deemed to be a bug!)

If you bind to IN_ADDR_ANY then a second socket can be bound
to the same port once the outgoing connection has been made
(and the actual local address assigned).
This works for TCP, but for SCTP you almost always need to
constrain the local addresses advertised on the connection.

Ideas?

I've not tried binding to IN_ADDR_ANY and using bindx to
add all the addresses.

	David


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-08 17:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-08  9:03 Multiple connections from the same source address David Laight
2017-09-08  9:29 ` Michael Tuexen
2017-09-08  9:37 ` David Laight
2017-09-08 14:49 ` Marcelo Ricardo Leitner
2017-09-08 15:01 ` David Laight
2017-09-08 15:11 ` 'Marcelo Ricardo Leitner'
2017-09-08 15:28 ` Michael Tuexen
2017-09-08 15:40 ` David Laight
2017-09-08 15:42 ` David Laight
2017-09-08 17:04 ` Michael Tuexen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.