Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6: constify rt6_nexthop()

There is no functional change in this patch, it only prepares the next one.

rt6_nexthop() will be used by ip6_dst_lookup_neigh(), which uses const
variables.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reported-by: kbuild test robot <lkp@intel.com>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nicolas Dichtel and committed by
David S. Miller
9b1c1ef1 22e72b5e

+7 -7
+1 -1
drivers/net/vrf.c
··· 350 350 { 351 351 struct dst_entry *dst = skb_dst(skb); 352 352 struct net_device *dev = dst->dev; 353 + const struct in6_addr *nexthop; 353 354 struct neighbour *neigh; 354 - struct in6_addr *nexthop; 355 355 int ret; 356 356 357 357 nf_reset(skb);
+2 -2
include/net/ip6_route.h
··· 262 262 inet6_sk(sk)->pmtudisc == IPV6_PMTUDISC_OMIT; 263 263 } 264 264 265 - static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt, 266 - struct in6_addr *daddr) 265 + static inline const struct in6_addr *rt6_nexthop(const struct rt6_info *rt, 266 + const struct in6_addr *daddr) 267 267 { 268 268 if (rt->rt6i_flags & RTF_GATEWAY) 269 269 return &rt->rt6i_gateway;
+2 -2
net/bluetooth/6lowpan.c
··· 160 160 struct in6_addr *daddr, 161 161 struct sk_buff *skb) 162 162 { 163 - struct lowpan_peer *peer; 164 - struct in6_addr *nexthop; 165 163 struct rt6_info *rt = (struct rt6_info *)skb_dst(skb); 166 164 int count = atomic_read(&dev->peer_count); 165 + const struct in6_addr *nexthop; 166 + struct lowpan_peer *peer; 167 167 168 168 BT_DBG("peers %d addr %pI6c rt %p", count, daddr, rt); 169 169
+1 -1
net/ipv6/ip6_output.c
··· 59 59 { 60 60 struct dst_entry *dst = skb_dst(skb); 61 61 struct net_device *dev = dst->dev; 62 + const struct in6_addr *nexthop; 62 63 struct neighbour *neigh; 63 - struct in6_addr *nexthop; 64 64 int ret; 65 65 66 66 if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr)) {
+1 -1
net/netfilter/nf_flow_table_ip.c
··· 439 439 struct nf_flowtable *flow_table = priv; 440 440 struct flow_offload_tuple tuple = {}; 441 441 enum flow_offload_tuple_dir dir; 442 + const struct in6_addr *nexthop; 442 443 struct flow_offload *flow; 443 444 struct net_device *outdev; 444 - struct in6_addr *nexthop; 445 445 struct ipv6hdr *ip6h; 446 446 struct rt6_info *rt; 447 447