ipv6: ip6_route_output does not modify sk parameter, so make it const
authorFlorian Westphal <fw@strlen.de>
Wed, 23 Mar 2011 02:17:36 +0000 (19:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Mar 2011 02:17:36 +0000 (19:17 -0700)
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>
include/net/ip6_route.h
net/ipv6/route.c

index 642a80bb42cfaa0a18ef8f00af01512a7674d0ff..c850e5fb967cb0626dcbc6c9049da83cddab3312 100644 (file)
@@ -70,7 +70,7 @@ static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt)
 extern void                    ip6_route_input(struct sk_buff *skb);
 
 extern struct dst_entry *      ip6_route_output(struct net *net,
-                                                struct sock *sk,
+                                                const struct sock *sk,
                                                 struct flowi6 *fl6);
 
 extern int                     ip6_route_init(void);
index 6814c8722fa7dd8784a0cbfefcefa219ba789475..843406f14d7b2b37ac33b039f52fe80feb132cba 100644 (file)
@@ -854,7 +854,7 @@ static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table
        return ip6_pol_route(net, table, fl6->flowi6_oif, fl6, flags);
 }
 
-struct dst_entry * ip6_route_output(struct net *net, struct sock *sk,
+struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk,
                                    struct flowi6 *fl6)
 {
        int flags = 0;