]> git.proxmox.com Git - mirror_iproute2.git/commit
rto_min value display overflow
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Fri, 21 Dec 2007 13:58:04 +0000 (22:58 +0900)
committerStephen Hemminger <shemminger@linux-foundation.org>
Fri, 21 Dec 2007 17:13:36 +0000 (09:13 -0800)
commit7c73e1bd21bc54b20b2d4ad0fc1a94ca0b76c285
treec41512a86cd91beb035fa961e5ed82adab43992b
parent4b270b172a6e570f4e9fa1ebb4bc67b0e715ee48
rto_min value display overflow

Reported by: Satoru SATOH <satoru.satoh@gmail.com>
"ip route show" does not print correct value when larger rto_min is
set (e.g. 3sec).

This problem is because of overflow in print_route() and
the patch below is a workaround fix for that.

[root test]# ./iproute2.git.org/ip/ip route show dev eth1
192.168.140.0/24  proto kernel  scope link  src 192.168.140.130
169.254.0.0/16  scope link
[root test]# ./iproute2.git.org/ip/ip route change 192.168.140.0/24
dev eth1 rto_min 3s
[root test]# ./iproute2.git.org/ip/ip route show dev eth1
192.168.140.0/24  scope link  rto_min lock 2ms     <-- wrong
169.254.0.0/16  scope link
[root test]# ./iproute2.git/ip/ip route show dev eth1  # patched version
192.168.140.0/24  scope link  rto_min lock 3000ms  <-- correct
169.254.0.0/16  scope link

This is a simpler fix.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ip/iproute.c