zephyr/samples
Jukka Rissanen 9028ecbc56 samples: net: zperf: Allow DHCPv4 or manually set addresses
If user has enabled DHCPv4, then allow to use its address instead
of giving error if static address cannot be set. Similar fix for
IPv6, so allow user to manually set an IPv6 address.

Because DHCPv4 has already set the IPv4 address to the network
interface, then zperf might not be able to add the pre-configured
address to it. So instead of returning immediately, try to use the
IP address that is already in the network interface. This way we
avoid this error print.

  uart:~$ zperf udp download 5001

  Setting IP address 2001:db8::1
  Setting destination IP address 2001:db8::2
  Cannot set IPv4 address 192.0.2.1
  Unable to set IP
  Setting destination IP address 192.0.2.2

  Cannot set IPv4 address 192.0.2.1
  Unable to set IPv4
  Binding to 192.0.2.1
  Cannot bind IPv4 UDP port 5001 (-2)

In this example, the network interface already had a proper and working
IPv4 address 192.168.0.2 in it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-12-01 16:32:07 +02:00
..
application_development
basic
bluetooth Bluetooth: Mesh: Demo: Increase loopback buf count 2020-11-26 13:04:22 +01:00
boards samples: nrf: battery: fix reference to ADC node 2020-11-27 20:26:45 -05:00
cpp_synchronization
debug
display
drivers
hello_world
lorawan/class_a
mpu
net samples: net: zperf: Allow DHCPv4 or manually set addresses 2020-12-01 16:32:07 +02:00
philosophers
portability
posix
scheduler
sensor
shields
smp
subsys shell: example: prj_minimal config update 2020-11-30 16:03:01 -06:00
synchronization
testing/integration
tfm_integration
userspace
video
classic.rst
index.rst