iperf
iperf copied to clipboard
Make the UDP socket use the right source address
PLEASE NOTE the following text from the iperf3 license. Submitting a pull request to the iperf3 repository constitutes "[making] Enhancements available...publicly":
You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to Lawrence Berkeley National
Laboratory, without imposing a separate written license agreement for such
Enhancements, then you hereby grant the following license: a non-exclusive,
royalty-free perpetual license to install, use, modify, prepare derivative
works, incorporate into other computer software, distribute, and sublicense
such enhancements or derivative works thereof, in binary and source code form.
The complete iperf3 license is available in the LICENSE
file in the
top directory of the iperf3 source tree.
- Version of iperf3 (or development branch, such as
master
or3.1-STABLE
) to which this pull request applies:
master
- Issues fixed (if any):
Source address of UDP replies may be different from the destination address of corresponding UDP requests.
- Brief description of code changes (suitable for use as a commit message):
When accepting a new UDP packet, replace the session socket with a new one bound to the destination address of the incoming packet. This way the right source IP address will be used on packets sent towards the client.