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
1602 1602
1603 sk = req->rsk_listener;1603 sk = req->rsk_listener;
1604 if (unlikely(tcp_v4_inbound_md5_hash(sk, skb))) {1604 if (unlikely(tcp_v4_inbound_md5_hash(sk, skb))) {
1605 sk_drops_add(sk, skb);
1605 reqsk_put(req);1606 reqsk_put(req);
1606 goto discard_it;1607 goto discard_it;
1607 }1608 }
net/ipv6/tcp_ipv6.c+1−0
@@ -1409,6 +1409,7 @@ process: · 1408 unmodified lines
1409 sk = req->rsk_listener;1409 sk = req->rsk_listener;
1410 tcp_v6_fill_cb(skb, hdr, th);1410 tcp_v6_fill_cb(skb, hdr, th);
1411 if (tcp_v6_inbound_md5_hash(sk, skb)) {1411 if (tcp_v6_inbound_md5_hash(sk, skb)) {
1412 sk_drops_add(sk, skb);
1412 reqsk_put(req);1413 reqsk_put(req);
1413 goto discard_it;1414 goto discard_it;
1414 }1415 }

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