Page MenuHomeFreeBSD

tcp: update error counter when dropping a packet due to bad source
ClosedPublic

Authored by glebius on Mar 23 2023, 9:54 PM.
Tags
None
Referenced Files
F132948502: D39234.id119539.diff
Tue, Oct 21, 10:37 AM
Unknown Object (File)
Fri, Oct 10, 2:32 PM
Unknown Object (File)
Fri, Oct 10, 2:32 PM
Unknown Object (File)
Fri, Oct 10, 2:32 PM
Unknown Object (File)
Fri, Oct 10, 7:59 AM
Unknown Object (File)
Sun, Oct 5, 2:42 AM
Unknown Object (File)
Sun, Sep 28, 2:46 PM
Unknown Object (File)
Sun, Sep 28, 1:24 PM

Details

Summary

Use the same counter that ip_input()/ip6_input() use for bad destination
address. For IPv6 this is already heavily abused ip6s_badscope, which
needs to be split into several separate error counters.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 50549
Build 47440: arc lint + arc unit

Event Timeline

tuexen added inline comments.
sys/netinet/tcp_input.c
678

Why do you keep the /* XXX */ in one case, but not in the other. I suggest to be consistent.

markj added inline comments.
sys/netinet/tcp_input.c
678

For v4, badaddr seems like a reasonable counter. Here, the use of badscope is overloaded, I believe the XXX comment indicates that this is not the right counter. However, it's better than not counting at all.

sys/netinet/tcp_input.c
678

Yes, exactly what Mark said. :)

This revision was not accepted when it landed; it landed in state Needs Review.Mar 28 2023, 1:38 AM
This revision was automatically updated to reflect the committed changes.