TCP repair in a nutshell
Pavel Emelyanov
Linux Plumbers, New Orleans, 2013
2
Problem
take one end of a TCP connection
and relocate it on another machine
3
Solution
TCP connection in Linux = a pair of sockets
Introduce a repair mode for it
– A set of new sockopts to manipulate TCP-specific things
• Seq-s
• Timestamps
• Handshake options
• Queues
– Sockets API syscalls “just do it”
With these two we can disassemble and assemble them
– Merged in Linux-3.5
4
TODO
●
Transitional states
●
OOB data
●
Repair shutdown state
●
Connection tracking (netfilter)
●
What have we missed from TCP state machine?
●
Optimizations
5
More info
CRIU sources git://git.criu.org/crtools.git
TCP repair example ${src}/tcp.c
Some docs http://criu.org/TCP_connection
/me xemul@openvz.org
5
More info
CRIU sources git://git.criu.org/crtools.git
TCP repair example ${src}/tcp.c
Some docs http://criu.org/TCP_connection
/me xemul@openvz.org

Tcp repair

  • 1.
    TCP repair ina nutshell Pavel Emelyanov Linux Plumbers, New Orleans, 2013
  • 2.
    2 Problem take one endof a TCP connection and relocate it on another machine
  • 3.
    3 Solution TCP connection inLinux = a pair of sockets Introduce a repair mode for it – A set of new sockopts to manipulate TCP-specific things • Seq-s • Timestamps • Handshake options • Queues – Sockets API syscalls “just do it” With these two we can disassemble and assemble them – Merged in Linux-3.5
  • 4.
    4 TODO ● Transitional states ● OOB data ● Repairshutdown state ● Connection tracking (netfilter) ● What have we missed from TCP state machine? ● Optimizations
  • 5.
    5 More info CRIU sourcesgit://git.criu.org/crtools.git TCP repair example ${src}/tcp.c Some docs http://criu.org/TCP_connection /me xemul@openvz.org
  • 6.
    5 More info CRIU sourcesgit://git.criu.org/crtools.git TCP repair example ${src}/tcp.c Some docs http://criu.org/TCP_connection /me xemul@openvz.org