diff options
| author | David S. Miller <[email protected]> | 2018-04-25 03:59:11 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-04-25 03:59:11 +0000 |
| commit | c749fa181bd5848be78691d23168ec61ce691b95 (patch) | |
| tree | d037dc016bd880d9d5b393a30f3907ef5e98124d /net/ipv4/tcp_input.c | |
| parent | liquidio: Swap VF representor Tx and Rx statistics (diff) | |
| parent | Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
| download | kernel-c749fa181bd5848be78691d23168ec61ce691b95.tar.gz kernel-c749fa181bd5848be78691d23168ec61ce691b95.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5a17cfc75326..8acbe5fd2098 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3889,11 +3889,8 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th) int length = (th->doff << 2) - sizeof(*th); const u8 *ptr = (const u8 *)(th + 1); - /* If the TCP option is too short, we can short cut */ - if (length < TCPOLEN_MD5SIG) - return NULL; - - while (length > 0) { + /* If not enough data remaining, we can short cut */ + while (length >= TCPOLEN_MD5SIG) { int opcode = *ptr++; int opsize; |
