This is a split-off from D33979, where only an acute issue is addressed.
The below points were noted incidentially while addressing that TF_PREVVALID
must not, just by itself, be used as sole condition for restoring old TCP state.
- Use the semantically correct TSTMP_xx macro when comparing timestamps. (No functional change)
- check for bad retransmits only when TSopt is present in ACK (don't assume there will be a valid TSopt in the TCP options struct)
- exclude tsecr == 0, since that most likely indicates an invalid ts echo return (tsecr) value.