Skip to content

Commit 3aef934

Browse files
Eric Dumazetdavem330
authored andcommitted
ipv6: constify ip6_dst_lookup_{flow|tail}() sock arguments
ip6_dst_lookup_flow() and ip6_dst_lookup_tail() do not touch socket, lets add a const qualifier. This will permit the same change in inet6_csk_route_req() Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e5895bc commit 3aef934

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/net/ipv6.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ static inline struct sk_buff *ip6_finish_skb(struct sock *sk)
849849

850850
int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
851851
struct flowi6 *fl6);
852-
struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
852+
struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
853853
const struct in6_addr *final_dst);
854854
struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
855855
const struct in6_addr *final_dst);

net/ipv6/ip6_output.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk,
883883
return dst;
884884
}
885885

886-
static int ip6_dst_lookup_tail(struct net *net, struct sock *sk,
886+
static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk,
887887
struct dst_entry **dst, struct flowi6 *fl6)
888888
{
889889
#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
@@ -1014,7 +1014,7 @@ EXPORT_SYMBOL_GPL(ip6_dst_lookup);
10141014
* It returns a valid dst pointer on success, or a pointer encoded
10151015
* error code.
10161016
*/
1017-
struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
1017+
struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
10181018
const struct in6_addr *final_dst)
10191019
{
10201020
struct dst_entry *dst = NULL;

0 commit comments

Comments
 (0)