Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang committed May 28, 2024
1 parent 16aa6d4 commit 4ae716e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tools/testing/selftests/bpf/prog_tests/sk_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,17 +1309,14 @@ static int switch_netns(void)
static const char * const setup_script[] = {
"ip -6 addr add dev lo " EXT_IP6 "/128",
"ip -6 addr add dev lo " INT_IP6 "/128",
"ip link set dev lo up",
NULL,
};
const char * const *cmd;
int err;

err = unshare(CLONE_NEWNET);
if (CHECK(err, "unshare", "failed\n")) {
log_err("unshare(CLONE_NEWNET)");
err = create_netns_unshare();
if (CHECK(err, "unshare", "failed\n"))
return -1;
}

for (cmd = setup_script; *cmd; cmd++) {
err = system(*cmd);
Expand Down

0 comments on commit 4ae716e

Please sign in to comment.