Most recent kernel where this bug did not occur: unknown Distribution: Ubuntu (kernel 2.6.22-14), Gentoo (kernel 2.6.23-gentoo-r3) Hardware Environment: x86 Software Environment: Steps to reproduce: (eth0 is 172.16.32.0/22): $ ip route add 172.17.0.1 via 172.16.32.1 $ ip route append 172.17.0.1 via 172.16.35.1 $ ip ro ... 172.17.0.1 via 172.16.32.1 dev eth0 172.17.0.1 via 172.16.35.1 dev eth0 ... $ ip ro replace 172.17.0.1 via 172.16.35.1 $ ip ro ... 172.17.0.1 via 172.16.35.1 dev eth0 172.17.0.1 via 172.16.35.1 dev eth0 ... $ ip ro del 172.17.0.1 $ ip ro ... 172.17.0.1 via 172.16.35.1 dev eth0 ... Problem Description: Is it OK: - only 1 route is deleted? - only 1 route is replaced? - replacing route results in dublicate routing table entry? Is this a bug or feature?
Should be fixed in 2.6.24-rc8 by this commit commit bd566e7525b5986864e8d6eb5b67640abcd284a9 Author: Joonwoo Park <joonwpark81@gmail.com> Date: Fri Jan 18 03:44:48 2008 -0800 [IPV4] fib_hash: fix duplicated route issue http://bugzilla.kernel.org/show_bug.cgi?id=9493 The fib allows making identical routes with 'ip route replace'. This patch makes the fib return -EEXIST if replacement would cause duplicati Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
I guess, that answer to first two questions: "Is it OK: - only 1 route is deleted? - only 1 route is replaced?" is "Yes"?