[Top] [All Lists]

Re: [IPv4]: More fib_alias insertion fixes

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [IPv4]: More fib_alias insertion fixes
From: Julian Anastasov <ja@xxxxxx>
Date: Sun, 26 Sep 2004 09:15:58 +0300 (EEST)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040925201425.16fbcb6c.davem@xxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0409252249150.1175@xxxxxxxxxxxx> <20040925201425.16fbcb6c.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx

On Sat, 25 Sep 2004, David S. Miller wrote:

> 2) The fib_alias list is not meant at all to be sorted by TOS
>    value. Within a TOS it _is_ sorted by priority.  This was
>    intentional, and I believe your changes assume I meant to
>    keep the "aliases ordered by TOS" property.  I did not.

        But it still needs one exception: the entries with TOS 0
must be at tail to allow fn_hash_lookup to match by TOS. With
random TOS insertion this is not guaranteed, the entries with
TOS=0 (wildcard) will match before the others.

        So, I fixed it to allow the TOS subchains to be
in any order but always before the subchain with TOS 0.

> Please give test cases when posting fixes of this nature.
> I wouldn't have to guess about #2 if you gave a bunch of
> "ip route foo" commands that gave behavior you think is
> incorrect.

        ok, I'm attaching 3 files: new diff, test script to add/del
entries in custom table and its output in another file (after
applying the patch). I'm using:

./ start
./ stop


Julian Anastasov <ja@xxxxxx>

Attachment: fib_ins2.diff
Description: fib_alias insertion fixes

Description: test script

Attachment: rt.out
Description: the desired output

<Prev in Thread] Current Thread [Next in Thread>