mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
tcp: MD5: Use MIB counter instead of warning for MD5 mismatch.
From a report by Matti Aarnio, and preliminary patch by Adam Langley. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8d50b53d66
commit
785957d3e8
4 changed files with 14 additions and 27 deletions
|
@ -1116,18 +1116,12 @@ static int tcp_v4_inbound_md5_hash(struct sock *sk, struct sk_buff *skb)
|
|||
return 0;
|
||||
|
||||
if (hash_expected && !hash_location) {
|
||||
LIMIT_NETDEBUG(KERN_INFO "MD5 Hash expected but NOT found "
|
||||
"(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)\n",
|
||||
NIPQUAD(iph->saddr), ntohs(th->source),
|
||||
NIPQUAD(iph->daddr), ntohs(th->dest));
|
||||
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPMD5NOTFOUND);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!hash_expected && hash_location) {
|
||||
LIMIT_NETDEBUG(KERN_INFO "MD5 Hash NOT expected but found "
|
||||
"(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)\n",
|
||||
NIPQUAD(iph->saddr), ntohs(th->source),
|
||||
NIPQUAD(iph->daddr), ntohs(th->dest));
|
||||
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPMD5UNEXPECTED);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue