Re: [PATCH 5.4 60/67] ipv4: Fix incorrect route flushing when source address is deleted

Shaoying Xu
2023-02-03T18:47:49Z

Hi Greg,

It seems this patch deletes the whole fib_tests.sh that causes new
failure in kselftests run. Looking at the upstream patch [1] and given the
context that ipv4_del_addr test is not available to kernel 5.4, I
updated the patch like attached below to resolve the potentail mistake.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f96a3d74554df537b6db5c99c27c80e7afadc8d1

Thanks,
Shaoying

================================ >8 ===========================================

diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 908913d75847..f45b9daf62cf 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -420,6 +420,7 @@ static struct fib_info *fib_find_info(struct fib_info *nfi)
nfi->fib_prefsrc == fi->fib_prefsrc &&
nfi->fib_priority == fi->fib_priority &&
nfi->fib_type == fi->fib_type &&
+ nfi->fib_tb_id == fi->fib_tb_id &&
memcmp(nfi->fib_metrics, fi->fib_metrics,
sizeof(u32) * RTAX_MAX) == 0 &&
!((nfi->fib_flags ^ fi->fib_flags) & ~RTNH_COMPARE_MASK) &&