Skip to content

Commit

Permalink
tproxy: added const specifiers to udp lookup functions
Browse files Browse the repository at this point in the history
The parameters for various UDP lookup functions were non-const, even though
they could be const. TProxy has some const references and instead of
downcasting it, I added const specifiers along the path.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: KOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Balazs Scheidler authored and Patrick McHardy committed Oct 21, 2010
1 parent e97c3e2 commit 88440ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ static void udp_v6_rehash(struct sock *sk)

static inline int compute_score(struct sock *sk, struct net *net,
unsigned short hnum,
struct in6_addr *saddr, __be16 sport,
struct in6_addr *daddr, __be16 dport,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif)
{
int score = -1;
Expand Down Expand Up @@ -239,8 +239,8 @@ static struct sock *udp6_lib_lookup2(struct net *net,
}

static struct sock *__udp6_lib_lookup(struct net *net,
struct in6_addr *saddr, __be16 sport,
struct in6_addr *daddr, __be16 dport,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif, struct udp_table *udptable)
{
struct sock *sk, *result;
Expand Down

0 comments on commit 88440ae

Please sign in to comment.