In poolnodcommand(): TTL (-T) is only valid when adding a node to a

pool (ippool -a) not when removing a node from a pool (ippool -r).
Flag -T as an error in ippool -r.
This commit is contained in:
Cy Schubert 2017-06-22 12:46:48 +00:00
parent 3f296d78cc
commit cd32671786

View File

@ -201,10 +201,14 @@ poolnodecommand(remove, argc, argv)
}
break;
case 'T' :
ttl = atoi(optarg);
if (ttl < 0) {
fprintf(stderr, "cannot set negative ttl\n");
return -1;
if (remove == 0) {
ttl = atoi(optarg);
if (ttl < 0) {
fprintf(stderr, "cannot set negative ttl\n");
return -1;
}
} else {
usage(argv[0]);
}
break;
case 'v' :