Skip to content

Commit 02a176d

Browse files
committed
ipv6: bring NLM_DONE out to a separate recv() again
Commit under Fixes optimized the number of recv() calls needed during RTM_GETROUTE dumps, but we got multiple reports of applications hanging on recv() calls. Applications expect that a route dump will be terminated with a recv() reading an individual NLM_DONE message. Coalescing NLM_DONE is perfectly legal in netlink, but even tho reporters fixed the code in respective projects, chances are it will take time for those applications to get updated. So revert to old behavior (for now)? This is an IPv6 version of commit 460b0d3 ("inet: bring NLM_DONE out to a separate recv() again"). Reported-by: Maciej Żenczykowski <[email protected]> Link: https://lore.kernel.org/all/CANP3RGc1RG71oPEBXNx_WZFP9AyphJefdO4paczN92n__ds4ow@mail.gmail.com Reported-by: Stefano Brivio <[email protected]> Link: https://lore.kernel.org/all/20240315124808.033ff58d@elisabeth Reported-by: Ilya Maximets <[email protected]> Link: https://lore.kernel.org/all/[email protected] Fixes: 5fc6832 ("ipv6: remove RTNL protection from inet6_dump_fib()") Tested-by: Ilya Maximets <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a876346 commit 02a176d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv6/ip6_fib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2514,7 +2514,8 @@ int __init fib6_init(void)
25142514
goto out_kmem_cache_create;
25152515

25162516
ret = rtnl_register_module(THIS_MODULE, PF_INET6, RTM_GETROUTE, NULL,
2517-
inet6_dump_fib, RTNL_FLAG_DUMP_UNLOCKED);
2517+
inet6_dump_fib, RTNL_FLAG_DUMP_UNLOCKED |
2518+
RTNL_FLAG_DUMP_SPLIT_NLM_DONE);
25182519
if (ret)
25192520
goto out_unregister_subsys;
25202521

0 commit comments

Comments
 (0)