Skip to content
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

sockperf pp udp mode: wrong source ip address in udp response datagrams #145

Open
O-ring opened this issue Mar 25, 2021 · 2 comments
Open

Comments

@O-ring
Copy link

O-ring commented Mar 25, 2021

Hello everyone,

I have found a bug with sockperf running a pp test (udp mode).
This is the setup on my linux machine where sockperf is running with this command:

sockperf sr --daemonize

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP>
inet 10.68.64.254/22 brd 10.68.67.255 scope global eth0

eth3: <BROADCAST,MULTICAST,UP,LOWER_UP>
inet 33.56.27.126/28 brd 33.56.27.127 scope global eth3
inet 33.56.27.125/32 scope global eth3

default via 10.68.64.1 dev eth0 metric 1
33.56.27.112/28 dev eth3 proto kernel scope link src 33.56.27.126

If I try to run a pp test from a client with this command:

sockperf pp -m 64 -i 10.68.64.254 --time 10 --full-rtt --mps=max

everything is fine: I can see the correct source and destination ip addresses in the udp datagrams.
Instead if I run this command from the client:

sockperf pp -m 64 -i 33.56.27.126 --time 10 --full-rtt --mps=max

I can see that the sockperf server is sending out the udp reply datagrams with the wrong source ip address: 10.68.64.254 instead of 33.56.27.126

The tcp test mode instead is fine. Indeed running the sockeperf server with this command is a workaround:

sockperf sr -i 33.56.27.126

Would be fine to have this bug fixed.

@igor-ivanov
Copy link
Collaborator

@O-ring please try with additional option as --client_ip

@O-ring
Copy link
Author

O-ring commented Mar 29, 2021

Hello Igor,

Same problem. This is the pcap capture taken on the server:

udp packet from client to server:

17:16:17.995933 IP (tos 0x28, ttl 59, id 55539, offset 0, flags [DF], proto UDP (17), length 92)
10.81.160.56.45096 > 33.56.27.126.11111: UDP, length 64

response udp packet from server to client:

17:16:17.978461 IP (tos 0x0, ttl 64, id 24898, offset 0, flags [DF], proto UDP (17), length 92)
10.68.64.254.11111 > 10.81.160.56.45096: UDP, length 64

As you can see, the running sockperf server is replying with the wrong source ip address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants