Open akonradi opened 1 year ago
Found while writing tests for Fuchsia. This test fails for Netstack2 (which is based on gVisor): https://fxrev.dev/c/fuchsia/+/729942/6/src/connectivity/network/tests/integration/socket/src/lib.rs#2205
A friendly reminder that this issue had no activity for 120 days.
Description
Setting SO_BINDTODEVICE on a bound TCP socket does not restrict the routes considered when initiating a connection with that socket.
With two interfaces set up with routes to the same destination subnet, and a TCP socket bound on * (all-zeroes address), setting the bound device for the socket before connecting does not restrict which interface the connection is attempted on.
The code in question is here; it checks
e.boundNICID
, which comes from the scope of the bound address, but note.boundBindToDevice
.Steps to reproduce
With two interfaces set up with routes to the same destination subnet,
runsc version
No response
docker version (if using docker)
No response
uname
No response
kubectl (if using Kubernetes)
No response
repo state (if built from source)
No response
runsc debug logs (if available)
No response