diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-31 16:16:50 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-31 16:16:50 -0800 |
commit | 0c838ff1ade71162775afffd9e5c6478a60bdca6 (patch) | |
tree | 81910cc5582f4862770307784c40c66aa3a44948 /net/ipv4/route.c | |
parent | 5b4704419cbd0b7597a91c19f9e8e8b17c1af071 (diff) | |
download | kernel_samsung_aries-0c838ff1ade71162775afffd9e5c6478a60bdca6.zip kernel_samsung_aries-0c838ff1ade71162775afffd9e5c6478a60bdca6.tar.gz kernel_samsung_aries-0c838ff1ade71162775afffd9e5c6478a60bdca6.tar.bz2 |
ipv4: Consolidate all default route selection implementations.
Both fib_trie and fib_hash have a local implementation of
fib_table_select_default(). This is completely unnecessary
code duplication.
Since we now remember the fib_table and the head of the fib
alias list of the default route, we can implement one single
generic version of this routine.
Looking at the fib_hash implementation you may get the impression
that it's possible for there to be multiple top-level routes in
the table for the default route. The truth is, it isn't, the
insert code will only allow one entry to exist in the zero
prefix hash table, because all keys evaluate to zero and all
keys in a hash table must be unique.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index b1e5d3a..242a3de 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2711,7 +2711,7 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, else #endif if (!res.prefixlen && res.type == RTN_UNICAST && !fl.oif) - fib_select_default(net, &fl, &res); + fib_select_default(&res); if (!fl.fl4_src) fl.fl4_src = FIB_RES_PREFSRC(res); |