No need to be root for pcapplay.
The first part, needed to get pcapplay without root powers going.
Ok. And pushing along, the second part got appended to this pull request too.
Oh, well. That was the intention anyway.
Looks good, thanks! I'd like to compile this and kick the tyres myself before I merge, but I should get to that this week.
What OSes have you tested this on? I have Linux, OS X, Cygwin and FreeBSD available to me, and it probably makes sense for me to test on the ones you haven't been able to.
Only tested on Linux.
Similar changes have been running for a longer while on the sipp-osso hg fork, but those too have only been seen by a Linux OS.
Cheers, Walter
(Excuse the short msg. This was composed on a phone...)
Rob Day [email protected] wrote:
Looks good, thanks! I'd like to compile this and kick the tyres myself before I merge, but I should get to that this week.
What OSes have you tested this on? I have Linux, OS X, Cygwin and FreeBSD available to me, and it probably makes sense for me to test on the ones you haven't been able to.
— Reply to this email directly or view it on GitHub.
I believe this has one issue: if you're using RTCP and/or other data over multiple ports, this does not work.
Not sure how to proceed.
- We could run the old code if one is root.
- Or we could add code to open extra ports as needed.
Both have disadvantages:
- Using the old root-code makes behaviour inconsistent/unpredictable.
- Opening ports as needed may not be possible (someone may have already allocated those).
Sorry for the delay - had to mull that issue over. I think the right thing to do is to open the necessary range of ports - but we should do that at the very start (by checking the pcap files, seeing how many unique port numbers there are, and opening that many at the right offsets from the "base" port). If we fail to open one, we can just choose another "base" port and retry.
Another option is to set CAP_NET_RAW on sipp.
An interesting option, but it has its own drawbacks.
I tried it indeed:
sudo setcap cap_net_raw+ep `which sipp`
But that broke my unittest framework, which introspects which sockets are open by looking at proc:
$ ls /proc/`pidof sipp`/fd
ls: cannot open directory /proc/9986/fd: Permission denied
Your personal unittest stuff Linux? Maybe ss would be more appropriate. The -p flag adds process information to the output.
Same difference:
$ ss -lp | grep 5060
tcp UNCONN 0 0 *:ipproto-5060 *:* users:(("sipp",3600,4))
Vs:
$ ss -lp | grep 5060
tcp UNCONN 0 0 *:ipproto-5060 *:*
Was to be expected ;)
Yeah, huh. TIL.
Interestingly, the polycom-sipped also did some work on this, seeing that the RAW sockets changed to DGRAM in this commit: https://github.com/SIPp/polycom-sipped/commit/e9b1f62ca1efbf0be010b2ea0650c601a43f1198
hi, is there any update on this PR?