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

ipv6: ip6_route_output does not modify sk parameter, so make it const

This avoids explicit cast to avoid 'discards qualifiers'
compiler warning in a netfilter patch that i've been working on.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Westphal and committed by
David S. Miller
9c7a4f9c db138908

+2 -2
+1 -1
include/net/ip6_route.h
··· 70 70 extern void ip6_route_input(struct sk_buff *skb); 71 71 72 72 extern struct dst_entry * ip6_route_output(struct net *net, 73 - struct sock *sk, 73 + const struct sock *sk, 74 74 struct flowi6 *fl6); 75 75 76 76 extern int ip6_route_init(void);
+1 -1
net/ipv6/route.c
··· 854 854 return ip6_pol_route(net, table, fl6->flowi6_oif, fl6, flags); 855 855 } 856 856 857 - struct dst_entry * ip6_route_output(struct net *net, struct sock *sk, 857 + struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk, 858 858 struct flowi6 *fl6) 859 859 { 860 860 int flags = 0;