mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
test: static/socket-tcp -- Check if unshare successed
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
dbdd19fa1b
commit
1efdb547e2
@ -68,7 +68,10 @@ int main(int argc, char **argv)
|
||||
socklen_t optlen;
|
||||
|
||||
#ifdef ZDTM_CONNTRACK
|
||||
unshare(CLONE_NEWNET);
|
||||
if (unshare(CLONE_NEWNET)) {
|
||||
pr_perror("unshare");
|
||||
return 1;
|
||||
}
|
||||
if (system("ip link set up dev lo"))
|
||||
return 1;
|
||||
if (system("iptables -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user