diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-24 18:58:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-24 21:16:30 -0400 |
commit | fd3a154a00fb991872680f19021f5edbb40b4dbe (patch) | |
tree | 5d0b22e1e707f9ea3dcd0c3062eaaed59bc331e2 /net/ipv6 | |
parent | 39f8e58e53be32ab758d30536e0bd2e6ce766462 (diff) |
tcp: md5: get rid of tcp_v[46]_reqsk_md5_lookup()
With request socks convergence, we no longer need
different lookup methods. A request socket can
use generic lookup function.
Add const qualifier to 2nd tcp_v[46]_md5_lookup() parameter.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 57d1c41404ec..a9568caf4675 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -486,17 +486,11 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, | |||
486 | } | 486 | } |
487 | 487 | ||
488 | static struct tcp_md5sig_key *tcp_v6_md5_lookup(struct sock *sk, | 488 | static struct tcp_md5sig_key *tcp_v6_md5_lookup(struct sock *sk, |
489 | struct sock *addr_sk) | 489 | const struct sock *addr_sk) |
490 | { | 490 | { |
491 | return tcp_v6_md5_do_lookup(sk, &addr_sk->sk_v6_daddr); | 491 | return tcp_v6_md5_do_lookup(sk, &addr_sk->sk_v6_daddr); |
492 | } | 492 | } |
493 | 493 | ||
494 | static struct tcp_md5sig_key *tcp_v6_reqsk_md5_lookup(struct sock *sk, | ||
495 | struct request_sock *req) | ||
496 | { | ||
497 | return tcp_v6_md5_do_lookup(sk, &inet_rsk(req)->ir_v6_rmt_addr); | ||
498 | } | ||
499 | |||
500 | static int tcp_v6_parse_md5_keys(struct sock *sk, char __user *optval, | 494 | static int tcp_v6_parse_md5_keys(struct sock *sk, char __user *optval, |
501 | int optlen) | 495 | int optlen) |
502 | { | 496 | { |
@@ -720,7 +714,7 @@ static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { | |||
720 | .mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - | 714 | .mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - |
721 | sizeof(struct ipv6hdr), | 715 | sizeof(struct ipv6hdr), |
722 | #ifdef CONFIG_TCP_MD5SIG | 716 | #ifdef CONFIG_TCP_MD5SIG |
723 | .md5_lookup = tcp_v6_reqsk_md5_lookup, | 717 | .req_md5_lookup = tcp_v6_md5_lookup, |
724 | .calc_md5_hash = tcp_v6_md5_hash_skb, | 718 | .calc_md5_hash = tcp_v6_md5_hash_skb, |
725 | #endif | 719 | #endif |
726 | .init_req = tcp_v6_init_req, | 720 | .init_req = tcp_v6_init_req, |