-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net, x/net/internal/socket: ipv6ZoneCache not updated on cache misses #28535
Comments
It's fine if this proposal focuses on the invalidation using the signal of operation malfunction; otherwise, we should take another approach that working together with the routing information base inside the kernel for accuracy and correctness (upon the fate/nature of IP routing; we cannot avoid any micro routing loop at any time, anywhere.) Also we need to fix x/net/internal/socket too.
Thanks. I miss a cup of Glühwein and Heidelberg Christmas market. |
Change https://golang.org/cl/146941 mentions this issue: |
Once the change landed, I can update x/net, too. |
Please add |
Change https://golang.org/cl/147739 mentions this issue: |
…interfaces Updates golang/go#28535 Change-Id: Id653b21b4d893cc8b6b9a74b129d1ce9b7e26a9f Reviewed-on: https://go-review.googlesource.com/c/147739 Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com> Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.11.1 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
Creating a listener on a link-local IPv6 address fails on bootup for ≈ 1 minute longer than necessary. This code:
results in:
Notably, listening fails for about 1 minute, which is the time it takes for zoneCache to be invalidated.
This is on a Raspberry Pi 3B+, where the eth0 interface is connected via USB (as is the case on all Raspberry Pi models).
What’s happening here is the following (in order):
::1
, which fills the zoneCache.bind
call’ssin6_scope_id
parameter is set to0
, because the zoneCache does not contain the correct entry for the eth0 interface. This is because zoneCache was filled before that interface existed. In strace, you’ll see:[pid 1716] bind(9, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "fe80::ba27:ebff:fe3b:11b0", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
[pid 1715] bind(7, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "fe80::ba27:ebff:fe3b:11b0", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=if_nametoindex("eth0")}, 28) = 0
I suggest we update the zoneCache upon cache misses, which fixes this issue. I can send a CL to do that.
The text was updated successfully, but these errors were encountered: