Re: [PATCH] ipv4: fix fib metrics

Eric Dumazet
2011-03-24T22:44:12Z

Le jeudi 24 mars 2011 à 15:36 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 24 Mar 2011 23:32:26 +0100
>
> > Then it doesnt work anymore because it parses an ipip field from
> > ip route get ...
> >
> > $ ip ro get 192.168.1.1
> > 192.168.1.1 dev wlan0 src 192.168.1.21
> > cache ipid 0x784c mtu 1500 advmss 1460 hoplimit 64
> >
> >
> > Maybe you upgraded iproute2
>
> I'm leaning towards app bug too.
>
> These default metrics wouldn't get printed before, but now because of
> how metrics are handled, they will.
>
> Userland needs to cope properly with this.

BTW, ipip is not always printed (even on old kernels) : One needs to
actually need ipip generation .

edumazet@edumazet-laptop:~$ ping 4.4.4.4
PING 4.4.4.4 (4.4.4.4) 56(84) bytes of data.
^C

edumazet@edumazet-laptop:~$ ip ro get 4.4.4.4
4.4.4.4 dev ppp0 src 10.150.51.210
cache mtu 1500 advmss 1460 hoplimit 64

edumazet@edumazet-laptop:~$ ping -s 2000 4.4.4.4
PING 4.4.4.4 (4.4.4.4) 2000(2028) bytes of data.
^C

edumazet@edumazet-laptop:~$ ip ro get 4.4.4.4
4.4.4.4 dev ppp0 src 10.150.51.210
cache ipid 0xf99a mtu 1500 advmss 1460 hoplimit 64

This on a 2.6.35 kernel

I suspect Alessandro tool had a bug anyway.