diff options
author | Eric Dumazet <edumazet@google.com> | 2024-04-29 16:30:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 12:39:55 +0300 |
commit | a97788b86d9d1531a0bee8b64b0c983889cbc899 (patch) | |
tree | f43b24fe7e148b37ff3117bcff7de3038ff36bef /net/ipv6 | |
parent | 30c83ed52fee13fd64bca8b08763fe98f3bea8a7 (diff) | |
download | linux-a97788b86d9d1531a0bee8b64b0c983889cbc899.tar.xz |
inet: introduce dst_rtable() helper
[ Upstream commit 05d6d492097c55f2d153fc3fd33cbe78e1e28e0a ]
I added dst_rt6_info() in commit
e8dfd42c17fa ("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: 92f1655aa2b2 ("net: fix __dst_negative_advice() race")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions