diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 3e06799b37a6..a07b59c528f3 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -697,7 +697,7 @@ static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval, | |||
697 | if (!cmd.tcpm_keylen) { | 697 | if (!cmd.tcpm_keylen) { |
698 | if (!tcp_sk(sk)->md5sig_info) | 698 | if (!tcp_sk(sk)->md5sig_info) |
699 | return -ENOENT; | 699 | return -ENOENT; |
700 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_MAPPED) | 700 | if (ipv6_addr_v4mapped(&sin6->sin6_addr)) |
701 | return tcp_v4_md5_do_del(sk, sin6->sin6_addr.s6_addr32[3]); | 701 | return tcp_v4_md5_do_del(sk, sin6->sin6_addr.s6_addr32[3]); |
702 | return tcp_v6_md5_do_del(sk, &sin6->sin6_addr); | 702 | return tcp_v6_md5_do_del(sk, &sin6->sin6_addr); |
703 | } | 703 | } |
@@ -720,7 +720,7 @@ static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval, | |||
720 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); | 720 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); |
721 | if (!newkey) | 721 | if (!newkey) |
722 | return -ENOMEM; | 722 | return -ENOMEM; |
723 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_MAPPED) { | 723 | if (ipv6_addr_v4mapped(&sin6->sin6_addr)) { |
724 | return tcp_v4_md5_do_add(sk, sin6->sin6_addr.s6_addr32[3], | 724 | return tcp_v4_md5_do_add(sk, sin6->sin6_addr.s6_addr32[3], |
725 | newkey, cmd.tcpm_keylen); | 725 | newkey, cmd.tcpm_keylen); |
726 | } | 726 | } |