You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ip route show
default via 192.168.1.1 dev eno1 proto dhcp metric 100
default via 100.99.192.213 dev wwan0 proto static metric 700
100.99.192.212/30 dev wwan0 proto kernel scope link src 100.99.192.214 metric 700
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.211 metric 100
When specifying this source ip as the LocalAddr in net.Dailer as this https://go.dev/play/p/vRKTPQMnyHu still results in the request being made to eno1 interface and not wwan0 interface.
What did you expect to see?
Using TCP dump I should see wwan0 for the request as such (via curl interface targeting curl -v --interface wwan0 https://api.ipify.org) 05:03:00.131301 wwan0 Out IP 100.99.192.214.40804 > 173.231.16.76.443: Flags [S], seq 2925401696, win 65236, options [mss 1388,sackOK,TS val 251821070 ecr 0,nop,wscale 7], length 0
What did you see instead?
I see the request is routed to eno1 interface which src 100.99.192.214 is not associated with (see ip route show above: 05:01:38.297518 eno1 Out IP 100.99.192.214.60759 > 173.231.16.76.443: Flags [S], seq 1998656637, win 64240, options [mss 1460,sackOK,TS val 251739236 ecr 0,nop,wscale 7], length 0
Request times out as the src ip does not match the right interface.
The text was updated successfully, but these errors were encountered:
This is outside the control of Go. The program has bound to the correct source IP, it's then up to the kernel to route it, pointing to misconfiguration on your routing side.
Closing as not a bug in Go.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have wwan0 with src ip 100.99.192.214:
When specifying this source ip as the LocalAddr in net.Dailer as this https://go.dev/play/p/vRKTPQMnyHu still results in the request being made to eno1 interface and not wwan0 interface.
What did you expect to see?
Using TCP dump I should see wwan0 for the request as such (via curl interface targeting
curl -v --interface wwan0 https://api.ipify.org
)05:03:00.131301 wwan0 Out IP 100.99.192.214.40804 > 173.231.16.76.443: Flags [S], seq 2925401696, win 65236, options [mss 1388,sackOK,TS val 251821070 ecr 0,nop,wscale 7], length 0
What did you see instead?
I see the request is routed to eno1 interface which src 100.99.192.214 is not associated with (see
ip route show
above:05:01:38.297518 eno1 Out IP 100.99.192.214.60759 > 173.231.16.76.443: Flags [S], seq 1998656637, win 64240, options [mss 1460,sackOK,TS val 251739236 ecr 0,nop,wscale 7], length 0
Request times out as the src ip does not match the right interface.
The text was updated successfully, but these errors were encountered: