Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88440ae7 authored by Balazs Scheidler's avatar Balazs Scheidler Committed by Patrick McHardy
Browse files

tproxy: added const specifiers to udp lookup functions



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: default avatarBalazs Scheidler <bazsi@balabit.hu>
Signed-off-by: default avatarKOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent e97c3e27
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;