Skip to content

Commit

Permalink
ipv6: ip6_route_output does not modify sk parameter, so make it const
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Mar 23, 2011
1 parent db13890 commit 9c7a4f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/ip6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c7a4f9

Please sign in to comment.