tcp: fix the test that a duplicate ACK has no data
When processing a TCP segment, data is removed from the head or
the tail. The test whether a segment has no data on it should
depend on the TCP segment before the removal. Without this,
received segments might trigger a fast retransmit even when they
should not.
Reported by: syzbot+fc97a2b5a0f7ea161161@syzkaller.appspotmail.com
Reviewed by: Peter Lei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51425
(cherry picked from commit e46c15a0f848174f58bb08fed8e173a76b4c473a)