lte/alt1250: Fix bug that name resolution failed for a long time #2064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fix bug that name resolution failed for a long time under particular cases. If a DNS query for IPv6 succeeds and IPv4 fails, only the answer of the IPv6 query is saved in the cache. If only IPv4 is given from LTE, name resolution will fail while the answer is saved in the cache. Therefore, the ALT1250 daemon sets the given IP type to the DNS client, which can only send DNS queries for that IP type.
Impact
Only alt1250 daemon.
Testing
Test with Spresense LTE board.