UDP and IPv6 iperf3 fails with "unable to accept stream connection: Invalid argument" error
- Dominant language
- C
- Stars
- 8.8k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
# Context
* Version of iperf3:
```
iperf 3.17.1 (cJSON 1.7.15)
Linux testbed-1 6.11.11 #1 SMP Thu Dec 12 17:55:41 UTC 2024 armv7l
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication, bind to device, support IPv4 don't fragment, POSIX threads
```
* Hardware:
armv7l GNU/Linux
* Operating system (and distribution, if any):
Linux (Buildroot)
# Bug Report
* Expected Behavior
Should be possible to run an iperf3 test in UDP on a IPv6 address.
* Actual Behavior
```
$ iperf3 -c fe80::aabb:ccff:fedd:eeff%wifi0 -u -b 30M -V
iperf 3.17.1
Linux testbed-1 6.11.11 #1 SMP Thu Dec 12 17:55:41 UTC 2024 armv7l
Control connection MSS 1428
Setting UDP block size to 1428
Time: Fri, 13 Dec 2024 14:09:13 UTC
Connecting to host fe80::aabb:ccff:fedd:eeff%wifi0, port 5201
Cookie: zqym5vfwatgl5kei56tgxsz34s7dn72mcl6a
Target Bitrate: 30000000
iperf3: error - unable to read from stream socket: Resource temporarily unavailable
```
* Steps to Reproduce
- Get Ipv6 of target host (here, for the wifi0 interface):
```
$ ip -6 a show wifi0
5: wifi0: mtu 1500 qdisc noqueue state UP group default qlen 1000
inet6 fe80::aabb:ccff:fedd:eeff/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
```
- Run an iperf3 server in the target host: `iperf3 -s`
- From the client host, try to start an UDP iperf3 test using the IPv6 of the target host (and the client output network interface, here, it is also wifi0) :
```
$ iperf3 -c fe80::aabb:ccff:fedd:eeff%wifi0 -u -b 30M -V
iperf 3.17.1
Linux testbed-1 6.11.11 #1 SMP Thu Dec 12 17:55:41 UTC 2024 armv7l
Control connection MSS 1428
Setting UDP block size to 1428
Time: Fri, 13 Dec 2024 14:09:13 UTC
Connecting to host fe80::aabb:ccff:fedd:eeff%wifi0, port 5201
Cookie: zqym5vfwatgl5kei56tgxsz34s7dn72mcl6a
Target Bitrate: 30000000
iperf3: error - unable to read from stream socket: Resource temporarily unavailable
```
* Possible Solution
It works if the test is done using an IPv4 address of the target host or in TCP. It is the combination of UDP and IPv6 that fails to work.
Contributor guide
Assessment
This issue has not been assessed yet.