TCP MD5 mismatches do increment sk_drops counter in all states but SYN_RECV. This is very unlikely to happen in the real world, but worth adding to help diagnostics. We increase the parent (listener) sk_drops.
Unified · Split
| @@ -1602,6 +1602,7 @@ process: · 1601 unmodified lines | ||
| 1602 | 1602 | |
| 1603 | 1603 | sk = req->rsk_listener; |
| 1604 | 1604 | if (unlikely(tcp_v4_inbound_md5_hash(sk, skb))) { |
| 1605 | + sk_drops_add(sk, skb); | |
| 1605 | 1606 | reqsk_put(req); |
| 1606 | 1607 | goto discard_it; |
| 1607 | 1608 | } |
| @@ -1409,6 +1409,7 @@ process: · 1408 unmodified lines | ||
| 1409 | 1409 | sk = req->rsk_listener; |
| 1410 | 1410 | tcp_v6_fill_cb(skb, hdr, th); |
| 1411 | 1411 | if (tcp_v6_inbound_md5_hash(sk, skb)) { |
| 1412 | + sk_drops_add(sk, skb); | |
| 1412 | 1413 | reqsk_put(req); |
| 1413 | 1414 | goto discard_it; |
| 1414 | 1415 | } |