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
Code inside the engine uses net.ParseIP to parse resolved IP addresses. Go stdlib resolver (and ooni/probe-cli#698) consider the IPv6 scope ID when serializing IP addresses. And net.ParseIPdoes not handle the scope. Therefore, if a DNS resolution returns a scoped IP address, we fail to parse it. In the specific context of ooni/probe-cli#698, the symptom was that sessionresolver failed with dns_bogon_error because it could not parse the returned IPv6 addresses and thus concluded it was passed a bogon (this is an unfortunate issue of the design of the code for detecting bogons). After noticing that, I changed the code to not include the scope ID if it is zero. But there is still a ticking bomb that basically most of the engine is not prepared to serialized scoped IPv6 addresses (so, e.g., a DHCP server may give out scoped IPv6 addresses representing the default resolver). I think in most cases this will not be a problem, but we know that IPv6 uses the scope for link-local addresses. We'll consider this issue done when we'll have figured out a better and scope-aware way of parsing IP addresses and we'll have removed net.ParseIP from our code base.
The text was updated successfully, but these errors were encountered:
Code inside the engine uses
net.ParseIP
to parse resolved IP addresses. Go stdlib resolver (and ooni/probe-cli#698) consider the IPv6 scope ID when serializing IP addresses. Andnet.ParseIP
does not handle the scope. Therefore, if a DNS resolution returns a scoped IP address, we fail to parse it. In the specific context of ooni/probe-cli#698, the symptom was thatsessionresolver
failed withdns_bogon_error
because it could not parse the returned IPv6 addresses and thus concluded it was passed a bogon (this is an unfortunate issue of the design of the code for detecting bogons). After noticing that, I changed the code to not include the scope ID if it is zero. But there is still a ticking bomb that basically most of the engine is not prepared to serialized scoped IPv6 addresses (so, e.g., a DHCP server may give out scoped IPv6 addresses representing the default resolver). I think in most cases this will not be a problem, but we know that IPv6 uses the scope for link-local addresses. We'll consider this issue done when we'll have figured out a better and scope-aware way of parsing IP addresses and we'll have removednet.ParseIP
from our code base.The text was updated successfully, but these errors were encountered: