Skip to content

Commit

Permalink
tcp: md5: fix a typo in tcp_v4_md5_lookup()
Browse files Browse the repository at this point in the history
Lookup key for tcp_md5_do_lookup() has to be taken
from addr_sk, not sk (which can be the listener)

Fixes: fd3a154 ("tcp: md5: get rid of tcp_v[46]_reqsk_md5_lookup()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Apr 9, 2015
1 parent 2e90952 commit b52e692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,9 @@ EXPORT_SYMBOL(tcp_md5_do_lookup);
struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk,
const struct sock *addr_sk)
{
union tcp_md5_addr *addr;
const union tcp_md5_addr *addr;

addr = (union tcp_md5_addr *)&sk->sk_daddr;
addr = (const union tcp_md5_addr *)&addr_sk->sk_daddr;
return tcp_md5_do_lookup(sk, addr, AF_INET);
}
EXPORT_SYMBOL(tcp_v4_md5_lookup);
Expand Down

0 comments on commit b52e692

Please sign in to comment.