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

[WAN_IP] Fall back to HTTP properly on DNS connection errors #134

Merged
merged 1 commit into from Jun 18, 2023

Conversation

ingrinder
Copy link
Collaborator

Description

This is just a small change so that if dig returns a nonzero exit code, then we don't immediately return None as the IP.

Reason and / or context

For example on my home network I block outgoing port 53:
image
As you see in this case archey fails to get the IP with the default settings and doesn't fall back to the configured HTTP URL ☹️

How has this been tested ?

It now gets my IP and passes the additional test case I added

Types of changes :

  • Bug fix (non-breaking change which fixes an issue)
  • Typo / style fix (non-breaking change which improves readability)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist :

  • [IF NEEDED] I have updated the README.md file accordingly ;
  • [IF NEEDED] I have updated the test cases (which pass) accordingly ;
  • [IF BREAKING] This pull request targets next Archey version branch ;
  • My changes looks good ;
  • I agree that my code may be modified in the future ;
  • My code follows the code style of this project (PEP8).

E.g. when the network whitelists outgoing port 53, in this case `dig`
will return with a nonzero error code
@HorlogeSkynet HorlogeSkynet added the bug 🐛 A real glitch has been found label Jun 18, 2023
@HorlogeSkynet HorlogeSkynet added this to IN PROGRESS in Core via automation Jun 18, 2023
@HorlogeSkynet HorlogeSkynet merged commit c622948 into master Jun 18, 2023
24 checks passed
Core automation moved this from IN PROGRESS to DONE Jun 18, 2023
@HorlogeSkynet HorlogeSkynet deleted the wan_ip_fallback branch June 18, 2023 07:02
@HorlogeSkynet HorlogeSkynet added this to the v4.14.2.0 milestone Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 A real glitch has been found
Projects
Core
  
DONE
Development

Successfully merging this pull request may close these issues.

None yet

2 participants