Don't trip over FIN+ACK retransmits.
Unlike most of the sockets in sock_diag_test, the ones used in
testFinWait1Socket do not disable FIN_WAIT by enabling linger
with a timeout of 0. This means that the sockets will retransmit
FINs until they are acked, which can cause subsequent tests or
subsequent test runs to fail with unexpected packets.
Fix this by ACKing the FIN. While we're at it, also check that
we see the socket go into FIN_WAIT2 state.
With this change, sock_diag_test passes when run 50 times in a
1 file changed