From: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
To: Dmitry Popov <ixaphire@qrator.net>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Cc: hideaki.yoshifuji@miraclelinux.com
Subject: Re: [PATCH] tcp: md5: remove unneeded check in tcp_v4_parse_md5_keys
Date: Mon, 04 Aug 2014 09:05:55 +0900 [thread overview]
Message-ID: <53DECE63.8070008@miraclelinux.com> (raw)
In-Reply-To: <20140803224519.49a40242da5c1cbe61f97753@qrator.net>
Dmitry Popov wrote:
> tcpm_key is an array inside struct tcp_md5sig, there is no need to check it
> against NULL.
>
> Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
(IPv6 side is okay.)
> ---
> net/ipv4/tcp_ipv4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 77cccda..8ea4eff 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -1064,7 +1064,7 @@ static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval,
> if (sin->sin_family != AF_INET)
> return -EINVAL;
>
> - if (!cmd.tcpm_key || !cmd.tcpm_keylen)
> + if (!cmd.tcpm_keylen)
> return tcp_md5_do_del(sk, (union tcp_md5_addr *)&sin->sin_addr.s_addr,
> AF_INET);
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--yoshfuji
prev parent reply other threads:[~2014-08-04 0:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-03 18:45 [PATCH] tcp: md5: remove unneeded check in tcp_v4_parse_md5_keys Dmitry Popov
2014-08-04 0:05 ` YOSHIFUJI Hideaki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DECE63.8070008@miraclelinux.com \
--to=hideaki.yoshifuji@miraclelinux.com \
--cc=davem@davemloft.net \
--cc=ixaphire@qrator.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.