Bug 9493 - routing table bug or feature adding/replacing/deleting routes
Summary: routing table bug or feature adding/replacing/deleting routes
Status: CLOSED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on: 9816
Blocks:
  Show dependency tree
 
Reported: 2007-12-03 11:23 UTC by Alexander Zubkov
Modified: 2008-09-24 06:39 UTC (History)
0 users

See Also:
Kernel Version: 2.6.23
Tree: Mainline
Regression: ---


Attachments

Description Alexander Zubkov 2007-12-03 11:23:26 UTC
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?
Comment 1 Stephen Hemminger 2008-01-23 19:21:33 UTC
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>
Comment 2 Alexander Zubkov 2008-01-24 00:16:18 UTC
I guess, that answer to first two questions:
"Is it OK:
- only 1 route is deleted?
- only 1 route is replaced?"
is "Yes"?

Note You need to log in before you can comment on or make changes to this bug.