-
Notifications
You must be signed in to change notification settings - Fork 398
TCP: Source address is from routing table not from -i flag #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ResultWith this fix SIPp sends traffic using the IP address specified with the -i flag for both TCP and UDP. I confirmed it using Wireshark with the v3.3 binary and my private binary (with this fix). Issue ObservedI saw one issue when using -t tn versus -t t1 and -t un versus -t u1.
Using -t tn or -t un caused SIPp to fail to start with the following message when using the binary I compiled from the source code with this fix. SIPp started just fine using the v3.3 binary I was previously using.
With both v3.3 and my private binary, SIPp ran fine with -t t1 or -t u1, as below:
Compile ProblemsI was compiling the source with the fix for this issue on CentOS 6.4 (64-bit) as well as CentOS 5.10 (32-bit) and ran into two problems. I am not experienced enough with C and compiling to know what effect my workarounds had. Maybe they contributed to the issue I observed with -t tn; I can't say for sure. Problem 1During ./configure I got the following error:
I made the error go away by commenting out the offending lines and replacing them with:
Problem 2During make I got the following errors.
I got rid of them by running ./configure and make this way:
Thank YouThank you for looking into this issue and providing a fix so quickly. Looking forward to getting this fix in the next release so my team and I can upgrade to it on all our setups. |
The maximum number of open sockets error you saw was because of this commit: 84d01c8 (Sat Feb 1 23:56:51 2014 +0000, new in 3.4) It's not a bug but a feature. |
Problem 1: did you run aclocal and friends? Of a different version? There is no line 10602 in the supplied configure. You should generally run |
Problem 2: fixed in 544abe4. Thanks for the detailed reports. |
Possible fix -- which unfortunately breaks other regression tests. This needs better testing facilities:
|
@wdoekes Oh shit, yeah, I just realized that since we don't use the |
Hi, I have the patch but I am still seeing that source IP is not the same what has been mentioned with -i option. Here is what sipp version I have: Command I am using is: Yet message received at remote end is from 172.16.80.1 which I think is what the kernel stack would have picked. Regards, |
Short Description
When using "-t tn" and "-i myip" the IP used to send messages is not myip but the IP from the OS (Linux) routing table.
Also filed the same bug on SourceForge: Issue 147. Posted on mailing list as well.
Steps to Reproduce
On the "server" side start netcat
On the "client" side run built-in UAC scenario using -t tn and -i myip
On the "server" side you'll see something like this on the output on netcat
Observed Result
If you look at the first line of the nc output it says the connection is from 10.10.0.4 instead of 10.10.0.5 (the IP we provided with the -i flag).
I have also tried -ci flag with the same result.
If I use -t un flag then the first line of output of nc is "Connection from 10.10.0.5 port 5060 [udp/*] accepted".
Expected Result
The IP 10.10.0.5 should be used whether -t is tn or un when making connections.
Client Environment
Server Environment
SIPp Version
The version of SIPp tried:
Workaround
A workaround I found was to add a SNAT rule to iptables to re-write the IP address. You may need to change the values according to your environment.
You can delete this rule when not needed.
The text was updated successfully, but these errors were encountered: