Skip to content
Commit dfbdfb05 authored by Robert Lubos's avatar Robert Lubos Committed by Anas Nashif
Browse files

tests: net: sockets: misc: Fix SO_BINDTODEVICE test



The test case for SO_BINDTODEVICE socket option was flaky, the client
socket always sent the datagram to the IP address of the second
interface, so in theory every packet should end up on that interface.
In practice though, due to imperfect loopback packet handling, the test
worked as the packet ended up on the interface it was sent from.

The test should send datagrams to the IP addresses of the interface 1
and 2 alternatively. The server socket binds to ANY address, so w/o
interface binding it should receive all datagrams, so it allows to
verify if SO_BINDTODEVICE filtering works fine.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent c2747acb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment