Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Viral Mehta <viral.vkm@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC] interface for outgoing packet
Date: Thu, 08 Sep 2011 08:09:05 +0200	[thread overview]
Message-ID: <1315462145.2532.10.camel@edumazet-laptop> (raw)
In-Reply-To: <CANX6DanC8DJsAZj4dV3oZo3DnLV6AyxBDm82vHaJm3C51aRqEg@mail.gmail.com>

Le mercredi 07 septembre 2011 à 20:24 -0400, Viral Mehta a écrit :
> Hi All,
> 
> How reasonably I can assume that,
> 
> on whatever interface, I received the last packet
> for a particular Socket Connection, the same interface will be
> used to SEND the next packet for same socket connection?
> 

No

> I am collecting the logs on one of my test machines.
> And it shows, I can assume all the time that "interface" which received packet
> for some socket connection, the same will be used to send packet for
> that connection
> 
> But, I am not sure if I am missing some scenarios
> or setup (for e.g., bonding) where it can be wrong ?
> 
> It would be more help if some one can shed some light.

By default, a socket is not bound to one interface, so you cant assume
this.

Check SO_BINDTODEVICE socket option if you need it.

      reply	other threads:[~2011-09-08  6:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08  0:24 [RFC] interface for outgoing packet Viral Mehta
2011-09-08  6:09 ` Eric Dumazet [this message]

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=1315462145.2532.10.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=viral.vkm@gmail.com \
    /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