diff options
author | Eric Dumazet <edumazet@google.com> | 2024-04-26 17:19:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-29 14:32:01 +0200 |
commit | e8dfd42c17faf183415323db1ef0c977be0d6489 (patch) | |
tree | c51745e2765effa88f3047a634efef44e00eebb1 /net/ipv6/ip6mr.c | |
parent | Merge branch 'mlxsw-events-processing-performance' (diff) | |
download | linux-e8dfd42c17faf183415323db1ef0c977be0d6489.tar.xz linux-e8dfd42c17faf183415323db1ef0c977be0d6489.zip |
ipv6: introduce dst_rt6_info() helper
Instead of (struct rt6_info *)dst casts, we can use :
#define dst_rt6_info(_ptr) \
container_of_const(_ptr, struct rt6_info, dst)
Some places needed missing const qualifiers :
ip6_confirm_neigh(), ipv6_anycast_destination(),
ipv6_unicast_destination(), has_gateway()
v2: added missing parts (David Ahern)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r-- | net/ipv6/ip6mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index cb0ee81a068a..dd342e6ecf3f 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -2273,7 +2273,7 @@ int ip6mr_get_route(struct net *net, struct sk_buff *skb, struct rtmsg *rtm, int err; struct mr_table *mrt; struct mfc6_cache *cache; - struct rt6_info *rt = (struct rt6_info *)skb_dst(skb); + struct rt6_info *rt = dst_rt6_info(skb_dst(skb)); mrt = ip6mr_get_table(net, RT6_TABLE_DFLT); if (!mrt) |