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 11:08:53 +0200 [thread overview]
Message-ID: <1284714533.3391.53.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTimpnqNSE21u=2qjb5VGJrn_3_--Bqp4veCNXMPE@mail.gmail.com>
Le vendredi 17 septembre 2010 à 10:46 +0200, Nicola Padovano a écrit :
> Aijaz, great! Now it' clear. Thank you.
> It remains a problem: the meaning of
>
> fl.nl_u.ip4_u.saddr = 0
>
> But, first of all:
> - we know that a routing table doesn't contain the ip source
> - but the routing cache contains it.
>
> so my first question is: why routing cache has it and routing cache
> not? what it its usage?
> Then my second question: the meaning of fl.nl_u.ip4_u.saddr = 0
>
> thank you very much
# ip addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
qlen 1000 txqueues 4
link/ether f4:ce:46:bb:32:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.20.108/24 brd 192.168.20.255 scope global eth1
inet6 fe80::f6ce:46ff:febb:32d4/64 scope link
valid_lft forever preferred_lft forever
# ip addr add 192.168.20.67/24 dev eth1
# ip addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
qlen 1000 txqueues 4
link/ether f4:ce:46:bb:32:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.20.108/24 brd 192.168.20.255 scope global eth1
inet 192.168.20.67/24 scope global secondary eth1
inet6 fe80::f6ce:46ff:febb:32d4/64 scope link
valid_lft forever preferred_lft forever
# ip ro
192.168.20.0/24 dev eth1 proto kernel scope link src 192.168.20.108
default via 192.168.20.254 dev eth1
# ip ro flush cache
# ip ro flush cache
# ip ro get 192.168.20.110
192.168.20.110 dev eth1 src 192.168.20.108
cache mtu 1500 advmss 1460 hoplimit 64
# ip ro get 192.168.20.110 from 192.168.20.67
192.168.20.110 from 192.168.20.67 dev eth1
cache mtu 1500 advmss 1460 hoplimit 64
# ip ro list cache
192.168.20.110 dev eth1 src 192.168.20.108
cache mtu 1500 advmss 1460 hoplimit 64
192.168.20.110 from 192.168.20.67 dev eth1
cache mtu 1500 advmss 1460 hoplimit 64
You can see two different routes in cache to reach 192.168.20.110,
one from "0.0.0.0" (we force src 192.168.20.108),
one from 192.168.20.67
With different keys (src addr, tos, fwmark, ...) we can have a lot of
different routes for apparently same destination
next prev parent reply other threads:[~2010-09-17 9:08 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 [this message]
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
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=1284714533.3391.53.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