Commit 559b540d authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[IPV4]: Missing TOS checks after fib_find_alias

It looks like some of the places where FIB_SCAN_TOS macros were used
have lost the tos check.  This patch adds them back.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5066446f
......@@ -538,6 +538,8 @@ fn_hash_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
*/
fa_orig = fa;
list_for_each_entry(fa, fa_orig->fa_list.prev, fa_list) {
if (fa->fa_tos != tos)
break;
if (fa->fa_info->fib_priority != fi->fib_priority)
break;
if (fa->fa_type == type &&
......@@ -639,6 +641,9 @@ fn_hash_delete(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
list_for_each_entry(fa, fa_head, fa_list) {
struct fib_info *fi = fa->fa_info;
if (fa->fa_tos != tos)
break;
if ((!r->rtm_type ||
fa->fa_type == r->rtm_type) &&
(r->rtm_scope == RT_SCOPE_NOWHERE ||
......
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