summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_route.h
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2019-06-24 16:01:08 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-26 13:26:08 -0700
commit9b1c1ef13b35fa35051b635ca9fbda39fe6bbc70 (patch)
treec0c49d78a531b98f9d9c7e593591cfb46e87a493 /include/net/ip6_route.h
parent22e72b5e049b95789b34a4cef316c791e7c2fed5 (diff)
downloadlinux-9b1c1ef13b35fa35051b635ca9fbda39fe6bbc70.tar.gz
linux-9b1c1ef13b35fa35051b635ca9fbda39fe6bbc70.tar.bz2
linux-9b1c1ef13b35fa35051b635ca9fbda39fe6bbc70.zip
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>
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r--include/net/ip6_route.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 4790beaa86e0..ee7405e759ba 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -262,8 +262,8 @@ static inline bool ip6_sk_ignore_df(const struct sock *sk)
inet6_sk(sk)->pmtudisc == IPV6_PMTUDISC_OMIT;
}
-static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt,
- struct in6_addr *daddr)
+static inline const struct in6_addr *rt6_nexthop(const struct rt6_info *rt,
+ const struct in6_addr *daddr)
{
if (rt->rt6i_flags & RTF_GATEWAY)
return &rt->rt6i_gateway;