Commit 1efdb547 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

test: static/socket-tcp -- Check if unshare successed

Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent dbdd19fa
...@@ -68,7 +68,10 @@ int main(int argc, char **argv) ...@@ -68,7 +68,10 @@ int main(int argc, char **argv)
socklen_t optlen; socklen_t optlen;
#ifdef ZDTM_CONNTRACK #ifdef ZDTM_CONNTRACK
unshare(CLONE_NEWNET); if (unshare(CLONE_NEWNET)) {
pr_perror("unshare");
return 1;
}
if (system("ip link set up dev lo")) if (system("ip link set up dev lo"))
return 1; return 1;
if (system("iptables -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT")) if (system("iptables -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment