Skip to content
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

Do not try to resolve with link-local src IP #3175

Merged
merged 1 commit into from
Apr 29, 2023

Conversation

milan-zededa
Copy link
Contributor

@milan-zededa milan-zededa commented Apr 28, 2023

ResolveWithPortsLambda would try every IP address assigned to a given port as a source address for a resolution query. However, if port has a link-local IP address assigned, we get lot's of warnings in the log such as this one:

[2023-04-28 10:14:42 | 85s]  <warning>   nim:nim.(*nim).resolveWithPorts   resolveWithPortsLambda failed: [dns exchange failed: dial udp: address [fe80::3306:6654:670:beeb]:0: no suitable address found dns exchange failed: dial udp: address [fe80::5d2d:ab19:3624:4ef7]:0: no suitable address found]

This can be avoided if ResolveWithPortsLambda skips non-global non-unicast IPs.

CC @christoph-zededa

@milan-zededa milan-zededa changed the title Do not try to resolve with local-only src IP Do not try to resolve with link-local src IP Apr 28, 2023
ResolveWithPortsLambda would try every IP address assigned to a given
port as a source address for a resolution query. However, if port has a
link-local IP address assigned, we get lot's of warnings in the log
such as this one:

[2023-04-28 10:14:42 | 85s] <warning>  nim:nim.(*nim).resolveWithPorts                    resolveWithPortsLambda failed: [dns exchange failed: dial udp: address [fe80::3306:6654:670:beeb]:0: no suitable address found dns exchange failed: dial udp: address [fe80::5d2d:ab19:3624:4ef7]:0: no suitable address found]

This can be avoided if ResolveWithPortsLambda skips non-global
non-unicast IPs.

Signed-off-by: Milan Lenco <milan@zededa.com>
@christoph-zededa
Copy link
Contributor

christoph-zededa commented Apr 28, 2023

LGTM - (I hope nobody uses IPv6 NAT)

@eriknordmark
Copy link
Contributor

LGTM - (I hope nobody uses IPv6 NAT)

@christoph-zededa IPv6 NATs plus only having IPv6 link local addresses is probably asking for trouble, since some host stacks might not allow a link-local source address with a global destination address.
IPv6 NATs with unique-local addresses or global addresses wouldn't be affected.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I verified that fd00:: and fc00:: (the ULA space) does return true from IsGlobalUnicast which is what we want.

@eriknordmark eriknordmark merged commit ebbf864 into lf-edge:master Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants