Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
efdcf377
Commit
efdcf377
authored
Aug 05, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
soccr/tcp: Prepare connection info for restore
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
c08eb3dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
sk-tcp.c
criu/sk-tcp.c
+42
-0
No files found.
criu/sk-tcp.c
View file @
efdcf377
...
@@ -496,6 +496,7 @@ static int restore_tcp_conn_state(int sk, struct libsoccr_sk *socr, struct inet_
...
@@ -496,6 +496,7 @@ static int restore_tcp_conn_state(int sk, struct libsoccr_sk *socr, struct inet_
int
aux
;
int
aux
;
struct
cr_img
*
img
;
struct
cr_img
*
img
;
TcpStreamEntry
*
tse
;
TcpStreamEntry
*
tse
;
struct
libsoccr_sk_data
data
=
{};
pr_info
(
"Restoring TCP connection id %x ino %x
\n
"
,
ii
->
ie
->
id
,
ii
->
ie
->
ino
);
pr_info
(
"Restoring TCP connection id %x ino %x
\n
"
,
ii
->
ie
->
id
,
ii
->
ie
->
ino
);
...
@@ -506,6 +507,47 @@ static int restore_tcp_conn_state(int sk, struct libsoccr_sk *socr, struct inet_
...
@@ -506,6 +507,47 @@ static int restore_tcp_conn_state(int sk, struct libsoccr_sk *socr, struct inet_
if
(
pb_read_one
(
img
,
&
tse
,
PB_TCP_STREAM
)
<
0
)
if
(
pb_read_one
(
img
,
&
tse
,
PB_TCP_STREAM
)
<
0
)
goto
err_c
;
goto
err_c
;
if
(
!
tse
->
has_unsq_len
)
{
pr_err
(
"No unsq len in the image
\n
"
);
goto
err_c
;
}
data
.
inq_len
=
tse
->
inq_len
;
data
.
inq_seq
=
tse
->
inq_seq
;
data
.
outq_len
=
tse
->
outq_len
;
data
.
outq_seq
=
tse
->
outq_seq
;
data
.
unsq_len
=
tse
->
unsq_len
;
data
.
mss_clamp
=
tse
->
mss_clamp
;
data
.
opt_mask
=
tse
->
opt_mask
;
if
(
tse
->
opt_mask
&
TCPI_OPT_WSCALE
)
{
if
(
!
tse
->
has_rcv_wscale
)
{
pr_err
(
"No rcv wscale in the image
\n
"
);
goto
err_c
;
}
data
.
snd_wscale
=
tse
->
snd_wscale
;
data
.
rcv_wscale
=
tse
->
rcv_wscale
;
}
if
(
tse
->
opt_mask
&
TCPI_OPT_TIMESTAMPS
)
{
if
(
!
tse
->
has_timestamp
)
{
pr_err
(
"No timestamp in the image
\n
"
);
goto
err_c
;
}
data
.
timestamp
=
tse
->
timestamp
;
}
if
(
tse
->
has_snd_wnd
)
{
data
.
flags
|=
SOCCR_FLAGS_WINDOW
;
data
.
snd_wl1
=
tse
->
snd_wl1
;
data
.
snd_wnd
=
tse
->
snd_wnd
;
data
.
max_window
=
tse
->
max_window
;
data
.
rcv_wnd
=
tse
->
rcv_wnd
;
data
.
rcv_wup
=
tse
->
rcv_wup
;
}
(
void
)
data
;
if
(
restore_tcp_seqs
(
sk
,
tse
))
if
(
restore_tcp_seqs
(
sk
,
tse
))
goto
err_c
;
goto
err_c
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment