tcp: improve consistency of syncache_respond() failure handling
When the initial sending of the SYN ACK segment using
syncache_respond() fails, it is handled as a permanent error.
To improve consistency, apply this policy in all cases, where
syncache_respond() is called. These include
- timer based retransmissions of the SYN ACK
- retransmitting a SYN ACK in response to a SYN retransmission
- sending of challenge ACKs in response to received RST segments
In these cases, fall back to SYN cookies, if enabled.
While there, also improve consistency of the TCP stats counters.
Reviewed by: cc, glebius (earlier version)
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46428