Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Nicola Padovano <nicola.padovano@gmail.com>
Cc: AIJAZ BAIG <aijazbaig1@gmail.com>,
	netfilter-devel <netfilter-devel@vger.kernel.org>,
	netdev@vger.kernel.org
Subject: Re: problem with flowi structure
Date: Fri, 17 Sep 2010 19:51:27 +0200	[thread overview]
Message-ID: <1284745887.2235.7.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTi=t2=jqu3XCC-3LK7x1_icke168Bqt-kmds6eOt@mail.gmail.com>

Dont top post, please.

Le vendredi 17 septembre 2010 à 19:05 +0200, Nicola Padovano a écrit :
> ok man :)
> the last question is about  fl.nl_u.ip4_u.saddr = 0...
> is it a kind of "jolly" selector of the source address?
> i.e. if we have a simplified cache route
> 
> SOURCE IP    DEST IP    NEXT HOP
> ips1                  google         nexthop1
> ips2                  google         nexthop2
> 
> with
> ...saddr = 0
> ....daddr = google
> ....tos =....
> i get nexthop1 or nexthop2. right?


Not "or" but exactly one.

If you have say 65534 ip addresses on your host (a full /16 network)

192.168.X.Y

If you want to send a frame from 182.168.1.2 to google, for sure the
route you are going to use is :

192.168.1.2  ->  google


If you want to send a frame from 182.168.10.20 to google, for sure the
route you are going to use is :

192.168.10.20  ->  google

and not the 192.168.1.2 -> google

if you say now :

Send a packet to google, please, I dont care of what source address you
chose, but I am interested to receive an answer, of course. (application
does not use bind() system call, only a send())

Then we look at the routing table given all the keys (for example, the
socket FWMARK or TOS value), and choose the primary address of the
network device the routes takes to join google.




  reply	other threads:[~2010-09-17 17:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 15:14 problem with flowi structure Nicola Padovano
2010-09-16 15:26 ` Eric Dumazet
2010-09-16 15:30   ` Nicola Padovano
2010-09-16 15:54     ` Eric Dumazet
2010-09-16 19:25       ` Nicola Padovano
2010-09-17  5:40         ` AIJAZ BAIG
2010-09-17  8:46           ` Nicola Padovano
2010-09-17  9:08             ` Eric Dumazet
2010-09-17  9:53               ` Nicola Padovano
2010-09-17 16:27               ` Nicola Padovano
2010-09-17 16:34                 ` Eric Dumazet
2010-09-17 17:05                   ` Nicola Padovano
2010-09-17 17:51                     ` Eric Dumazet [this message]
2010-09-17 18:01                       ` Nicola Padovano
2010-09-17 18:07                         ` Eric Dumazet
2010-09-17 18:25                           ` Nicola Padovano
2010-10-01 23:46                             ` Jan Engelhardt
2010-10-02  8:08                               ` Nicola Padovano
2010-10-02 20:18                                 ` David Miller

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=1284745887.2235.7.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=aijazbaig1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nicola.padovano@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