nping does not support --source-addr in udp unprivileged mode
Open
Nobody has claimed this yet.
enhancement
Nping
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.9k
- PR merge metrics
- No merged PRs in 30d
Description
If I run:
nping --udp --dest-port 50000 --dest-ip 232.1.3.100 --source-ip 127.0.0.1
I get the error message:
Mode UDP requires root privileges
This error message is somewhat misleading, but it seems to be due to the "--source-ip" parameter.
However, there is no reason this should not work, nping could just bind the socket to 127.0.0.1.
Netcat was able to do this with something like "echo Hello | nc -s 127.0.0.1 -u 232.1.3.100 50000"
Contributor guide
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
Start by reproducing the nping command in the issue and locating the UDP handling for the --source-ip option. Check how the source address is applied in unprivileged mode; done means the command can bind to 127.0.0.1 without requiring root, with an accurate error when it cannot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100