All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: linux-sctp@vger.kernel.org
Subject: Re: Multiple connections from the same source address.
Date: Fri, 08 Sep 2017 14:49:30 +0000	[thread overview]
Message-ID: <20170908144929.GA4529@localhost.localdomain> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD0071271@AcuExch.aculab.com>

On Fri, Sep 08, 2017 at 09:03:31AM +0000, David Laight wrote:
> 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.

When did you set IP_REUSEADDR? Checking the code, seems you have to set
it before any binding, because then the port entry will be created and
such flag will be initialized with that state.

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

Interesting. It does seem like a bug. Probably related to the above
behavior.

> 
> 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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2017-09-08 14:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170908144929.GA4529@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.