Commit f28aed26 authored by David S. Miller's avatar David S. Miller

[IPV4]: Fix list traversal in fn_hash_insert().

Could create an endless loop during route
replace operations.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f3960ea0
......@@ -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 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment