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:
parent
3f296d78cc
commit
cd32671786
@ -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' :
|
||||
|
Loading…
Reference in New Issue
Block a user