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

Change-Id: I7978f608dcc8a19504ed31bc33c4d9f02c573754
1 file changed
tree: 211799afbafd493ff11a7ee9e65b5a2e290431f2
  1. net/