Re: problem with flowi structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



so, setting fl.nl_u.ip4_u.saddr = 0 is a kind of "jolly" selector of
the source address?

On Fri, Sep 17, 2010 at 11:08 AM, Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> 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
>
>
>



-- 
Nicola Padovano
e-mail: nicola.padovano@xxxxxxxxx
web: http://npadovano.altervista.org
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux