summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2004-09-21 02:32:41 -0700
committerDavid S. Miller <davem@nuts.davemloft.net>2004-09-21 02:32:41 -0700
commitf28aed26ef456ec52e51ef7ed8af5be071a432f9 (patch)
treee3e79f0c189ca26efe3fcba73fc2cd3dae6b4888
parentf3960ea0e81fd995b597410704c6723fb6884a1f (diff)
[IPV4]: Fix list traversal in fn_hash_insert().
Could create an endless loop during route replace operations. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/fib_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 1737ce3a9487..a7ef851edb1d 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -536,7 +536,7 @@ fn_hash_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
* information.
*/
fa_orig = fa;
- list_for_each_entry(fa, fa->fa_list.prev, fa_list) {
+ list_for_each_entry(fa, fa_orig->fa_list.prev, fa_list) {
if (fa->fa_info->fib_priority != fi->fib_priority)
break;
if (fa->fa_type == type &&