[lkml]   [2000]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectQuery wrt Router Table behaviour
I've noticed that Linux' router table code
has always allowed duplicate entries. (Same
source, same destination, same device, same
gateway, etc.)
As the duplicates are redundant and just hog
router table space, is this "correct" behaviour?
(I remember hearing some time back the argument
that O'(O(t))=t, where O is the operation on the
table, O' is the inverse, and t is the table. At
first sight, this is logical, but it assumes
that the router table is a collection of items
which may or may not be unique. However, in
terms of how the computer behaves, the table is
a set of items which -must- be unique.)
Yes, I know that the table is being held in a
linked list, which makes searches inefficient,
but that always leaves two options:
Option 1: have a garbage-collection routine
periodicly clense the router table of junk.
Option 2: Store the table in a tree (for
the destination), and a list within that. This
would make for quicker searches (though given
the list is usually small, probably not
significantly), and easier checks for duplicates
at insertion time.
Having said all that, none of this is exactly
obscure or arcane. I can therefore conclude that
there are some excellent reasons I'm missing for
the Linux networking code to work the way it
If anyone wants to enlighten me, please feel

--== Sent via ==--
Before you buy.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:58    [W:0.034 / U:2.460 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site