Commit 4395d48c authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Stephen Hemminger

iproute2: Improve "ip netns add" failure error message

Report the name of the network namespace that could not be
added.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 8e2d47dc
......@@ -135,8 +135,8 @@ static int netns_exec(int argc, char **argv)
snprintf(net_path, sizeof(net_path), "%s/%s", NETNS_RUN_DIR, name);
netns = open(net_path, O_RDONLY);
if (netns < 0) {
fprintf(stderr, "Cannot open network namespace: %s\n",
strerror(errno));
fprintf(stderr, "Cannot open network namespace %s: %s\n",
name, strerror(errno));
return EXIT_FAILURE;
}
if (setns(netns, CLONE_NEWNET) < 0) {
......
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