Inconsistent semantics of -r and -s with one and many targets
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The code contains some `args->targets_len > 1` ifs that make no sense from the consistency viewpoint and have already tripped up the main user (cake-autorate). For example:
```
tsping -D -m -t -r 500 -s 0 127.0.0.1 127.0.0.2 # creates nicely half-second spaced pings to two targets
tsping -D -m -t -r 500 -s 0 127.0.0.1 127.0.0.2 127.0.0.3 # creates nicely half-second spaced pings to three targets
```
But, instead of creating nicely half-second spaced pings to one target, this creates an almost infinite-speed flood:
```
tsping -D -m -t -r 500 -s 0 127.0.0.1
```
Note that cake-autorate uses `--sleep-time "0" --target-spacing "${ping_response_interval_ms}"` as hard-coded `tsping` arguments, and will fall into this trap if the user sets `no_pingers` to 1.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the command-line handling around the `args->targets_len > 1` conditions. Reproduce the one-target and multi-target commands from the issue, then trace how `--sleep-time` and `--target-spacing` affect pacing. Done means one target observes the same spacing semantics as multiple targets without an unintended flood.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100