[CRIU] [PATCH RFC POC 0/6] tcp: add support of intermediate closing states

Andrey Vagin avagin at openvz.org
Tue Mar 4 21:04:54 PST 2014


For restoring this state we need to queue a fin packet in one of both
direction. If we close output direction, a socket turns into FIN-WAIT.
If we close ingoing direction, a socket turns into CLOSE_WAIT.
If we close both directions, a socket turns into onf of LAST_ACK or
CLOSING, it depends on the order of closing.

The size of fin packet is 1, but it can be received, but fin packet
doesn't contain user data. For this reason we need to adjust the size
data in a send queue.

Known issues: sk->shutdown isn't restore yet

Andrey Vagin (5):
  zdtm: add test cases on TCP_CLOSE_WAIT and TCP_LAST_ACK states
  zdtm: check sockets in the TCP_CLOSING state
  tcp: add support of intermediate closing states
  tcp: allow to dump intermediate closing states
  zdtm: add tests to check closing tcp states

 sk-inet.c                                     |  17 +-
 sk-tcp.c                                      |  74 ++++++-
 sockets.c                                     |  15 +-
 test/zdtm.sh                                  |   5 +
 test/zdtm/live/static/Makefile                |   5 +
 test/zdtm/live/static/socket-tcp-close-wait.c | 268 ++++++++++++++++++++++++++
 test/zdtm/live/static/socket-tcp-closing.c    | 233 ++++++++++++++++++++++
 test/zdtm/live/static/socket-tcp-last-ack.c   |   1 +
 8 files changed, 613 insertions(+), 5 deletions(-)
 create mode 100644 test/zdtm/live/static/socket-tcp-close-wait.c
 create mode 100644 test/zdtm/live/static/socket-tcp-closing.c
 create mode 120000 test/zdtm/live/static/socket-tcp-last-ack.c

-- 
1.8.5.3



More information about the CRIU mailing list