History

tcp: md5: increment sk_drops on syn_recv state

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.

Eric Dumazet committed 10 years ago

Commit e65c3321 parent bb40aca2 files · +2 −0Browse files

Unified · Split

2 files
  1. net/ipv4/tcp_ipv4.c +1 −0
  2. net/ipv6/tcp_ipv6.c +1 −0
net/ipv4/tcp_ipv4.c+1−0
@@ -1602,6 +1602,7 @@ process: · 1601 unmodified lines
16021602
16031603 sk = req->rsk_listener;
16041604 if (unlikely(tcp_v4_inbound_md5_hash(sk, skb))) {
1605+ sk_drops_add(sk, skb);
16051606 reqsk_put(req);
16061607 goto discard_it;
16071608 }
net/ipv6/tcp_ipv6.c+1−0
@@ -1409,6 +1409,7 @@ process: · 1408 unmodified lines
14091409 sk = req->rsk_listener;
14101410 tcp_v6_fill_cb(skb, hdr, th);
14111411 if (tcp_v6_inbound_md5_hash(sk, skb)) {
1412+ sk_drops_add(sk, skb);
14121413 reqsk_put(req);
14131414 goto discard_it;
14141415 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t