The exit code for ip label was not correct.
The return from the command function is negated and turned into
the exit code on failure.
req.ifal.ifal_family = AF_INET6;
if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
- return 2;
+ return -2;
return 0;
}
if (rtnl_wilddump_request(&rth, af, RTM_GETADDRLABEL) < 0) {
perror("Cannot send dump request");
- return 1;
+ return -1;
}
if (rtnl_dump_filter(&rth, flush_addrlabel, NULL) < 0) {
fprintf(stderr, "Flush terminated\n");
- return 1;
+ return -1;
}
return 0;