inet: introduce dst_rtable() helper
[ Upstream commit 05d6d492 ] I added dst_rt6_info() in commit e8dfd42c ("ipv6: introduce dst_rt6_info() helper") This patch does a similar change for IPv4. Instead of (struct rtable *)dst casts, we can use : #define dst_rtable(_ptr) \ container_of_const(_ptr, struct rtable, dst) Patch is smaller than IPv6 one, because IPv4 has skb_rtable() helper. Signed-off-by:Eric Dumazet <edumazet@google.com> Reviewed-by:
David Ahern <dsahern@kernel.org> Reviewed-by:
Sabrina Dubroca <sd@queasysnail.net> Link: https://lore.kernel.org/r/20240429133009.1227754-1-edumazet@google.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 92f1655a ("net: fix __dst_negative_advice() race") Signed-off-by:
Sasha Levin <sashal@kernel.org>
parent
30c83ed5
Please register or sign in to comment