Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev <netdev@vger.kernel.org>, Thomas Graf <tgraf@suug.ch>
Subject: Re: Bug with IPv6-UDP address binding
Date: Thu, 09 Aug 2012 13:37:50 +0200	[thread overview]
Message-ID: <1344512270.28967.719.camel@edumazet-glaptop> (raw)
In-Reply-To: <1344505205.3069.55.camel@localhost>

On Thu, 2012-08-09 at 11:40 +0200, Jesper Dangaard Brouer wrote:

> Yes, I guess its an application bug, because Berkely-derived
> implementations don't handle multihomeing well for UDP.
> 
> Why are we keeping this, counter-intuitive behavior? 
> 

Because the BSD api has no other choice.

> What about changing the implementation to act like Solaris, which IMHO
> makes much more sense?
> 
> (BTW, iperf also have this "bug")
> 

Please describe how connect() is able to correctly chose for you a
source address, if you have say 256 addresses.

connect() API only requires the destination.

If you want a precise source, you must use bind() before the connect()

Any UDP application wanting to correctly reflect "correct source IP"
must say so to the kernel.

I dont think kernel could magically help here, really.

  reply	other threads:[~2012-08-09 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 20:37 Bug with IPv6-UDP address binding Jesper Dangaard Brouer
2012-08-08 20:59 ` Eric Dumazet
2012-08-09  9:40   ` Jesper Dangaard Brouer
2012-08-09 11:37     ` Eric Dumazet [this message]
2012-08-09 11:43     ` Eric Dumazet
2012-08-10 19:15       ` Jesper Dangaard Brouer
2012-08-21 21:51       ` Jesper Dangaard Brouer
2012-08-09 11:48     ` Eric Dumazet

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=1344512270.28967.719.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=brouer@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox